Re: Proper way to make a one-off multi-file testcase?

2008-02-01 Thread Paul Koning
Hans-Peter == Hans-Peter Nilsson [EMAIL PROTECTED] writes: Hans-Peter On Wed, 30 Jan 2008, Ian Lance Taylor wrote: One issue here is that in some cases const and pure calls can get combined and eliminated even with attribute noinline (unless this changed recently). So in addition to

Re: Proper way to make a one-off multi-file testcase?

2008-02-01 Thread Hans-Peter Nilsson
On Wed, 30 Jan 2008, Ian Lance Taylor wrote: One issue here is that in some cases const and pure calls can get combined and eliminated even with attribute noinline (unless this changed recently). So in addition to attribute noinline, putting an asm volatile () in the function can help make it

Re: Proper way to make a one-off multi-file testcase?

2008-02-01 Thread Hans-Peter Nilsson
On Fri, 1 Feb 2008, Paul Koning wrote: Hans-Peter == Hans-Peter Nilsson [EMAIL PROTECTED] writes: Hans-Peter (The volatile is redundant; an asm without in/out Hans-Peter operands is always volatile.) That's what the docs say, but I've seen indications that this is not actually how it

Re: Proper way to make a one-off multi-file testcase?

2008-01-31 Thread Joern Rennecke
One issue here is that in some cases const and pure calls can get combined and eliminated even with attribute noinline (unless this changed recently). So in addition to attribute noinline, putting an asm volatile () in the function can help make it non-pure and non-const. Yes, that did the

Proper way to make a one-off multi-file testcase?

2008-01-30 Thread Joern Rennecke
We've encountered a bad code generation problem because of the way that resource.c:mark_set_resources is ignorant of COND_EXEC patterns, which ultimately results in a delay slot instruction clobbering a register for the fall-through pass because find_dead_or_set_registers flags registers set in a

Re: Proper way to make a one-off multi-file testcase?

2008-01-30 Thread Eric Botcazou
It has callers and callees which should not be inlined in order to reproduce the bug. __attribute__((noinline))? -- Eric Botcazou

Re: Proper way to make a one-off multi-file testcase?

2008-01-30 Thread Jakub Jelinek
On Wed, Jan 30, 2008 at 09:18:14PM +, Joern Rennecke wrote: However, AFAIK having multiple source files is at odds with a simple test. If noinline attribute doesn't help, then you can use /* { dg-additional-sources ... } */ (just grep for dg-additional-sources in testsuite/gcc.dg/*.c to see

Re: Proper way to make a one-off multi-file testcase?

2008-01-30 Thread Joern Rennecke
On Wed, Jan 30, 2008 at 10:51:25PM +0100, Jakub Jelinek wrote: On Wed, Jan 30, 2008 at 09:18:14PM +, Joern Rennecke wrote: However, AFAIK having multiple source files is at odds with a simple test. If noinline attribute doesn't help, then you can use It doesn't. I see the symbols with

Re: Proper way to make a one-off multi-file testcase?

2008-01-30 Thread Ian Lance Taylor
Joern Rennecke [EMAIL PROTECTED] writes: On Wed, Jan 30, 2008 at 10:51:25PM +0100, Jakub Jelinek wrote: On Wed, Jan 30, 2008 at 09:18:14PM +, Joern Rennecke wrote: However, AFAIK having multiple source files is at odds with a simple test. If noinline attribute doesn't help, then