On 20/08/2012, PARAT Didier <didier.pa...@fr.thalesgroup.com> wrote: > Hi, > > I am using DejaGNU on GCC's Testsuite and a problem appeared to me, some > tests fail when they shouldn't be. > > For example: The test gcc.dg/pr27528.c has the line " /* { dg-options "" } > */ " which means that this test should be compiled without any options, > right?
Wrong. It means an empty string should be appended to the list of default optio.s (at least that's what it means for libstdc++ tests, where the defaults come from scripts/testsuite_flags) > But DejaGNU seems to pass some basic options anyway (for ex. -O1, > -O2, etc...) and this causes the test to fail because it is meant to be > tested without optimizations. Then maybe it should use { dg-options "-O0" } > I saw this problem with a lot more testcases causing them to have two > optimization level in the same command line "gcc ... -O1 -O2 -o ...". This > problem seems to happen when the testcase has some specific options in the > line dg_options, for ex. " /* { dg-options "-O2" } */ ". That's not a problem, the last -On option overrides any earlier ones. > Did anyone ever try to run the GCC testsuite with DejaGNU and notice this > kind of things? > > I'm using DejaGNU 1.5 > > Thanks, > Didier >