PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / pr27528.c
blobc9bb238e96ba84bfbc9740e406c6109ef6251616
1 /* Check the warnings and errors generated for asm operands that aren't
2 obviously constant but that are constrained to be constants. */
3 /* { dg-options "" } */
5 int bar (int);
6 void
7 foo (int *x, int y)
9 int constant = 0;
10 asm ("# %0" :: "i" (x)); /* { dg-warning "probably doesn't match" } */
11 /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
13 asm ("# %0" :: "i" (bar (*x))); /* { dg-warning "probably doesn't match" } */
14 /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
16 asm ("# %0" :: "i" (*x + 0x11)); /* { dg-warning "probably doesn't match" } */
17 /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
19 asm ("# %0" :: "i" (constant)); /* { dg-warning "probably doesn't match" } */
20 /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */
22 asm ("# %0" :: "i" (y * 0)); /* folded */