diff options
author | Chris Lattner <sabre@nondot.org> | 2009-10-13 07:14:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-10-13 07:14:16 +0000 |
commit | 3ae9f48ae0d07a5aa352bf03c944f557a5ac4c95 (patch) | |
tree | 3b2bde2c8364bdd1a49544f3919d8169dceb9bbb /test/CodeGen | |
parent | 3d00fdc82fd550ae4bfbb2e700a1fc85bbd6d6fd (diff) |
Teach sema and codegen about the difference between address of labels,
which is a common idiom to improve PIC'ness of code using the addr of
label extension. This implementation is a gross hack, but the only other
alternative would be to teach evalutate about this horrid combination.
While GCC allows things like "&&foo - &&bar + 1", people don't use this
in practice. This implements PR5131.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83957 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/statements.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/CodeGen/statements.c b/test/CodeGen/statements.c index c50d1d5664..45bbd9ac02 100644 --- a/test/CodeGen/statements.c +++ b/test/CodeGen/statements.c @@ -18,7 +18,9 @@ baz: blong: bing: ; -static long x = &&bar; // - &&baz; + +// PR5131 +static long x = &&bar - &&baz; static long y = &&baz; &&bing; &&blong; |