annotate gcc/testsuite/gcc.dg/pr27528.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Check the warnings and errors generated for asm operands that aren't
kono
parents:
diff changeset
2 obviously constant but that are constrained to be constants. */
kono
parents:
diff changeset
3 /* { dg-options "" } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 int bar (int);
kono
parents:
diff changeset
6 void
kono
parents:
diff changeset
7 foo (int *x, int y)
kono
parents:
diff changeset
8 {
kono
parents:
diff changeset
9 int constant = 0;
kono
parents:
diff changeset
10 asm ("# %0" :: "i" (x)); /* { dg-warning "probably doesn't match" } */
kono
parents:
diff changeset
11 /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 asm ("# %0" :: "i" (bar (*x))); /* { dg-warning "probably doesn't match" } */
kono
parents:
diff changeset
14 /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 asm ("# %0" :: "i" (*x + 0x11)); /* { dg-warning "probably doesn't match" } */
kono
parents:
diff changeset
17 /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 asm ("# %0" :: "i" (constant)); /* { dg-warning "probably doesn't match" } */
kono
parents:
diff changeset
20 /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 asm ("# %0" :: "i" (y * 0)); /* folded */
kono
parents:
diff changeset
23 }