Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr27528.c @ 118:fd00160c1b76
ifdef TARGET_64BIT
author | mir3636 |
---|---|
date | Tue, 27 Feb 2018 15:01:35 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line source
/* Check the warnings and errors generated for asm operands that aren't obviously constant but that are constrained to be constants. */ /* { dg-options "" } */ int bar (int); void foo (int *x, int y) { int constant = 0; asm ("# %0" :: "i" (x)); /* { dg-warning "probably doesn't match" } */ /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */ asm ("# %0" :: "i" (bar (*x))); /* { dg-warning "probably doesn't match" } */ /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */ asm ("# %0" :: "i" (*x + 0x11)); /* { dg-warning "probably doesn't match" } */ /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */ asm ("# %0" :: "i" (constant)); /* { dg-warning "probably doesn't match" } */ /* { dg-error "impossible constraint" "" { target *-*-* } .-1 } */ asm ("# %0" :: "i" (y * 0)); /* folded */ }