llvm-project/lld/test/LinkerScript/expr-precedence.test

35 lines
593 B
Plaintext
Raw Normal View History

/*
RUN: linker-script-test %s | FileCheck %s
*/
SECTIONS {
. = foo >= bar + 1 ? bar : 1- - - -1;
}
/*
CHECK: kw_sections: SECTIONS
CHECK: l_brace: {
CHECK: identifier: .
CHECK: equal: =
CHECK: identifier: foo
CHECK: greaterequal: >=
CHECK: identifier: bar
CHECK: plus: +
CHECK: number: 1
CHECK: question: ?
CHECK: identifier: bar
CHECK: colon: :
CHECK: number: 1
CHECK: minus: -
CHECK: minus: -
CHECK: minus: -
CHECK: minus: -
CHECK: number: 1
CHECK: semicolon: ;
CHECK: r_brace: }
CHECK: eof:
CHECK: SECTIONS
CHECK: {
CHECK: . = (foo >= (bar + 1)) ? bar : (1 - (-(-(-1))))
CHECK: }
*/