Re: buggy optimization levels...

2003-08-03 Thread Jens Rehsack
On 01.08.2003 05:00, Erik Trulsson wrote: On Thu, Jul 31, 2003 at 10:30:57PM -0400, Chuck Swiger wrote: [...] problem of compiling the system with cc -O2 resulting in a buggy kernel. If you determine that compiling with cc -O -fgcse results in failures, [...] There is an open bug report in

Re: buggy optimization levels...

2003-08-03 Thread Chuck Swiger
Erik Trulsson wrote: On Sat, Aug 02, 2003 at 03:52:25PM -0400, Chuck Swiger wrote: [ ... ] That wasn't my real point anyway. I was trying to refute your statement that Even if the code contains a bug, cc -O and cc -O -fgcse should produce the same results. I claim that if the code has a bug that

Re: buggy optimization levels...

2003-08-02 Thread Chuck Swiger
Erik Trulsson wrote: On Thu, Jul 31, 2003 at 10:30:57PM -0400, Chuck Swiger wrote: [ ... ] I understand that figuring out why the kernel died can be hard, particularly if the failures aren't concise and completely reproducable, and thus tracing the problem back to making the right change to gcc

Re: buggy optimization levels...

2003-08-02 Thread Chuck Swiger
Kris Kennaway wrote: [ ... ] This is the trivial part (you don't even need to modify gcc, because all the optimizations turned on by -Ofoo are also available as individual -fblah options). Indeed. If you've forgotten, I quoted the section of the gcc source code which indicates which individual

Re: buggy optimization levels...

2003-08-02 Thread Erik Trulsson
On Sat, Aug 02, 2003 at 12:19:06PM -0400, Chuck Swiger wrote: Erik Trulsson wrote: On Thu, Jul 31, 2003 at 10:30:57PM -0400, Chuck Swiger wrote: [ ... ] I understand that figuring out why the kernel died can be hard, particularly if the failures aren't concise and completely reproducable,

Re: buggy optimization levels...

2003-08-02 Thread Chuck Swiger
Erik Trulsson wrote: [ ... ] A somewhat contrived example that behaves differently when compiled with -O3 or when compiled with -O2 or lower optimization follows: static int f(int a) { return a/0; } int main(void) { int x; x = f(5); return 0; } Contrived, but

Re: buggy optimization levels...

2003-08-02 Thread Erik Trulsson
On Sat, Aug 02, 2003 at 03:52:25PM -0400, Chuck Swiger wrote: Erik Trulsson wrote: [ ... ] A somewhat contrived example that behaves differently when compiled with -O3 or when compiled with -O2 or lower optimization follows: static int f(int a) { return a/0; } int main(void)

Re: buggy optimization levels...

2003-08-01 Thread LLeweLLyn Reese
Chuck Swiger [EMAIL PROTECTED] writes: Hi, all-- The known bugs section of the GCC info documentation lists 5 issues; man gcc lists none. You are looking in the 'wrong' place for 'known bugs' (Or the GCC people aren't putting the info in the 'right' place :-)

Re: buggy optimization levels...

2003-07-31 Thread Kris Kennaway
On Mon, Jul 14, 2003 at 05:37:45PM -0400, Chuck Swiger wrote: Hi, all-- The known bugs section of the GCC info documentation lists 5 issues; man gcc lists none. Can someone provide a test case for a bug involving cc -O versus cc -O3 under FreeBSD 4-STABLE for the x86 architecture?

Re: buggy optimization levels...

2003-07-31 Thread Chuck Swiger
Kris Kennaway wrote: On Mon, Jul 14, 2003 at 05:37:45PM -0400, Chuck Swiger wrote: The known bugs section of the GCC info documentation lists 5 issues; man gcc lists none. Can someone provide a test case for a bug involving cc -O versus cc -O3 under FreeBSD 4-STABLE for the x86 architecture?

Re: buggy optimization levels...

2003-07-31 Thread Kris Kennaway
On Thu, Jul 31, 2003 at 09:34:17PM -0400, Chuck Swiger wrote: OK. Can the existence of such problems be confirmed reliably, say by regression testing? The problem is in identifying precisely which piece of code is failing. A regression test is only useful if it concisely exercises a

Re: buggy optimization levels...

2003-07-31 Thread Chuck Swiger
Kris Kennaway wrote: On Thu, Jul 31, 2003 at 09:34:17PM -0400, Chuck Swiger wrote: OK. Can the existence of such problems be confirmed reliably, say by regression testing? The problem is in identifying precisely which piece of code is failing. A regression test is only useful if it concisely

Re: buggy optimization levels...

2003-07-31 Thread Erik Trulsson
On Thu, Jul 31, 2003 at 10:30:57PM -0400, Chuck Swiger wrote: Kris Kennaway wrote: On Thu, Jul 31, 2003 at 09:34:17PM -0400, Chuck Swiger wrote: OK. Can the existence of such problems be confirmed reliably, say by regression testing? The problem is in identifying precisely which piece of

Re: buggy optimization levels...

2003-07-31 Thread Kris Kennaway
On Thu, Jul 31, 2003 at 10:30:57PM -0400, Chuck Swiger wrote: Fine. However, you don't _need_ to identify the reason why the kernel died, or solve the bug in global common expression elimination to solve the problem of compiling the system with cc -O2 resulting in a buggy kernel. If you

Re: buggy optimization levels...

2003-07-14 Thread LLeweLLyn Reese
Chuck Swiger [EMAIL PROTECTED] writes: Hi, all-- The known bugs section of the GCC info documentation lists 5 issues; man gcc lists none. Can someone provide a test case for a bug involving cc -O versus cc -O3 under FreeBSD 4-STABLE for the x86 architecture? You could probably find a few