| # REQUIRES: x86 | |
| # RUN: rm -rf %t && split-file %s %t && cd %t | |
| # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux /dev/null -o a.o | |
| # RUN: ld.lld --script a.t a.o -shared | |
| # lld shouldn't crash. | |
| #--- a.t | |
| SECTIONS { .foo : ALIGN(2M) {} } | |
| # RUN: not ld.lld --script b.t 2>&1 | FileCheck %s --match-full-lines --strict-whitespace | |
| # lld should not crash and report the error properly. | |
| # CHECK:{{.*}} error: b.t:3: malformed number: : | |
| # CHECK:>>> S :ALIGN(4096) {} | |
| # CHECK:>>> ^ | |
| #--- b.t | |
| SECTIONS | |
| { | |
| S :ALIGN(4096) {} | |
| } |