question on gcc testsuite gcc.dg/pr27528.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following code:
/* Check the warnings and errors generated for asm operands that aren't
   obviously constant but that are constrained to be constants.  */
/* { dg-options "" } */
/* { dg-error "constraint" "" { target *-*-* } 13 } */
/* { dg-error "constraint" "" { target *-*-* } 14 } */
/* { dg-error "constraint" "" { target *-*-* } 15 } */
/* { dg-error "constraint" "" { target *-*-* } 16 } */
int bar (int);
void
foo (int *x, int y)
{
  int constant = 0;
  asm ("# %0" :: "i" (x));
  asm ("# %0" :: "i" (bar (*x)));
  asm ("# %0" :: "i" (*x + 0x11));
  asm ("# %0" :: "i" (constant));
  asm ("# %0" :: "i" (y * 0));
}

-----------
And the compiler generates the following:
compiler exited with status 1
output is:
!!! DevWarn during Front End Driver: missing scheduling info, possibly
from optional core opcode (need to conditionalize this based on core
option flags)
/opt/local/jgu_fc3_br/cvsroot/
Tests/gcctests-xcc/testsuite/gcc.dg/pr27528.c: In function foo:
/opt/local/jgu_fc3_br/cvsroot/Tests/gcctests-xcc/testsuite/gcc.dg/pr27528.c:13:
error: integer immediate value expected for constraint `i' in an `asm'
/opt/local/jgu_fc3_br/cvsroot/Tests/gcctests-xcc/testsuite/gcc.dg/pr27528.c:
In function foo:
/opt/local/jgu_fc3_br/cvsroot/Tests/gcctests-xcc/testsuite/gcc.dg/pr27528.c:14:
error: integer immediate value expected for constraint `i' in an `asm'
/opt/local/jgu_fc3_br/cvsroot/Tests/gcctests-xcc/testsuite/gcc.dg/pr27528.c:
In function foo:
/opt/local/jgu_fc3_br/cvsroot/Tests/gcctests-xcc/testsuite/gcc.dg/pr27528.c:15:
error: integer immediate value expected for constraint `i' in an `asm'
/opt/local/jgu_fc3_br/cvsroot/Tests/gcctests-xcc/testsuite/gcc.dg/pr27528.c:
In function foo:
/opt/local/jgu_fc3_br/cvsroot/Tests/gcctests-xcc/testsuite/gcc.dg/pr27528.c:16:
error: integer immediate value expected for constraint `i' in an `asm'

FAIL: gcc.dg/pr27528.c  (test for errors, line 13)
FAIL: gcc.dg/pr27528.c  (test for errors, line 14)
FAIL: gcc.dg/pr27528.c  (test for errors, line 15)
FAIL: gcc.dg/pr27528.c  (test for errors, line 16)

Why does it report failures ?

Thanks
Junjie

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux