Internal-fn: Only allow modes describe types for internal fn[PR115961]
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / got_mem_hoist_1.c
blob46687bafe8b41484f1c56ac05051e0c4f9c83379
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fpic -fdump-rtl-loop2_invariant" } */
3 /* { dg-require-effective-target fpic } */
4 /* { dg-skip-if "Load/Store hoisted by RTL PRE already" { aarch64*-*-* } { "-mcmodel=tiny" "-mcmodel=large" } { "" } } */
6 int bar (int);
7 int cal (void *);
9 int
10 foo (int a, int bound)
12 int i = 0;
13 int sum = 0;
15 for (i; i < bound; i++)
16 sum = cal (bar);
18 return sum;
21 /* The insn which loads function address from GOT table should be moved out
22 of the loop. */
23 /* { dg-final { scan-rtl-dump "Decided" "loop2_invariant" } } */