[llvm] Warn on align directive with non-zero fill value in virtual sections (PR #66792)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 06:43:08 PDT 2023


=?utf-8?q?Luís?= Marques <luismarques at lowrisc.org>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/66792/llvm at github.com>


================
@@ -12,5 +12,8 @@
 # CHECK: {{.*}}.s:[[#@LINE+1]]:3: error: SHT_NOBITS section '.bss' cannot have instructions
   addb %al,(%rax)
 
+# CHECK: {{.*}}.s:[[#@LINE+1]]:11: warning: ignoring non-zero fill value in SHT_NOBITS section '.bss'
+.align 4, 42
+
----------------
s-barannikov wrote:

This check line would match if `Warning` was replaced with `Error`. I expected something like:

```
# RUN: not llvm-mc ... | FileCheck %s
# RUN: not llvm-mc --fatal-warnings ... | FileCheck --check-prefix=FATAL %s
...
# CHECK: ... warning: ignoring ...
# FATAL: ... error: ignoring...
```

I grepped mc tests and found only 4 tests that excercise `--fatal-warnings`, so I guess you can just drop the last commit and go ahead...


https://github.com/llvm/llvm-project/pull/66792


More information about the llvm-commits mailing list