1 /* PR target/56564 */
2 /* { dg-do compile { target { fpic && lp64 } } } */
3 /* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-darwin* } } */
4 /* { dg-options "-O3 -fpic -fdump-tree-optimized" } */
5
6 struct S { long a, b; } s = { 5, 6 };
7 char t[16] = { 7 };
8
9 int
foo(void)10 foo (void)
11 {
12 return ((__UINTPTR_TYPE__) &s) & 15;
13 }
14
15 int
bar(void)16 bar (void)
17 {
18 return ((__UINTPTR_TYPE__) &t[0]) & 15;
19 }
20
21 /* { dg-final { scan-tree-dump-times "&s" 1 "optimized" } } */
22 /* { dg-final { scan-tree-dump-times "&t" 0 "optimized" } } */
23 /* { dg-final { scan-tree-dump-times "return 0" 1 "optimized" } } */
24 /* { dg-final { scan-assembler ".align\[ \t]*16\[^:]*\[\n\r]s:" { target *-*-linux* } } } */
25 /* { dg-final { scan-assembler ".align\[ \t]*16\[^:]*\[\n\r]t:" { target *-*-linux* } } } */
26