public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/38387]  New: psim miscompiled [regression]
@ 2008-12-03 16:53 joel at gcc dot gnu dot org
  2008-12-03 16:55 ` [Bug c/38387] " joel at gcc dot gnu dot org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: joel at gcc dot gnu dot org @ 2008-12-03 16:53 UTC (permalink / raw)
  To: gcc-bugs

psim does not work when compiled with gcc SVN trunk.  It fails with an
assertion
on all runs.  This is true with gdb cvs or 6.8. It works when compiled with:

+ x86_64 Debian provided compiler.
   gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
+ x86_64 4.3.2 (CFARM /opt/cfarm/releases/4.3.2)
+ 32 bit Fedora 9 provided compiler
+ 32 bit Fedora 9 built from SVN trunk

So it has broken since 4.3.2.


-- 
           Summary: psim miscompiled [regression]
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: joel at gcc dot gnu dot org
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] psim miscompiled [regression]
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
@ 2008-12-03 16:55 ` joel at gcc dot gnu dot org
  2008-12-03 17:06 ` rguenth at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: joel at gcc dot gnu dot org @ 2008-12-03 16:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from joel at gcc dot gnu dot org  2008-12-03 16:54 -------
Created an attachment (id=16818)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16818&action=view)
program to run with psim

This is a random ACATS test executable that can be run with psim to show if it
works or doesn't.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] psim miscompiled [regression]
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
  2008-12-03 16:55 ` [Bug c/38387] " joel at gcc dot gnu dot org
@ 2008-12-03 17:06 ` rguenth at gcc dot gnu dot org
  2008-12-03 17:09 ` joel at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-03 17:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-12-03 17:04 -------
Does it work built with -fno-strict-aliasing?  -O1 or -O0?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] psim miscompiled [regression]
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
  2008-12-03 16:55 ` [Bug c/38387] " joel at gcc dot gnu dot org
  2008-12-03 17:06 ` rguenth at gcc dot gnu dot org
@ 2008-12-03 17:09 ` joel at gcc dot gnu dot org
  2008-12-03 17:10 ` joel dot sherrill at oarcorp dot com
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: joel at gcc dot gnu dot org @ 2008-12-03 17:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from joel at gcc dot gnu dot org  2008-12-03 17:07 -------
Created an attachment (id=16819)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16819&action=view)
psim device tree

Run as follows:

powerpc-rtems4.10-run -f psim_tree a22006c

Expected output:

,.,. A22006C ACATS 2.5 88-01-01 00:00:00
---- A22006C CHECK THAT A COMPILATION CAN BE PRECEDED BY EXTRA LINES.
==== A22006C PASSED ============================.

When psim is miscompiled, you get:

events.c:329: assertion failed - !events->processing


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] psim miscompiled [regression]
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-12-03 17:09 ` joel at gcc dot gnu dot org
@ 2008-12-03 17:10 ` joel dot sherrill at oarcorp dot com
  2008-12-03 17:23 ` joel at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: joel dot sherrill at oarcorp dot com @ 2008-12-03 17:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from joel dot sherrill at oarcorp dot com  2008-12-03 17:09 -------
Subject: Re:  psim miscompiled [regression]

rguenth at gcc dot gnu dot org wrote:
> ------- Comment #2 from rguenth at gcc dot gnu dot org  2008-12-03 17:04 -------
> Does it work built with -fno-strict-aliasing?  -O1 or -O0?
>
>
>   
Not to be stupid but how do I compile gcc with those arguments?

--joel


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] psim miscompiled [regression]
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-12-03 17:10 ` joel dot sherrill at oarcorp dot com
@ 2008-12-03 17:23 ` joel at gcc dot gnu dot org
  2008-12-03 17:33 ` joel at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: joel at gcc dot gnu dot org @ 2008-12-03 17:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from joel at gcc dot gnu dot org  2008-12-03 17:22 -------
Works with -O0

(CFLAGS="-O0" ~/old/test-gcc/gdb-6.8/configure --target=powerpc-rtems4.10
--enable-sim --enable-sim-hardware --enable-timebase --enable-sim-trace
--prefix=/n/12/joel/test-gcc/install/ && make && make install) >b.log 2>&1 &

(In reply to comment #4)
> Subject: Re:  psim miscompiled [regression]
> 
> rguenth at gcc dot gnu dot org wrote:
> > ------- Comment #2 from rguenth at gcc dot gnu dot org  2008-12-03 17:04 -------
> > Does it work built with -fno-strict-aliasing?  -O1 or -O0?
> >
> >
> >   
> Not to be stupid but how do I compile gcc with those arguments?
> 
> --joel
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] psim miscompiled [regression]
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-12-03 17:23 ` joel at gcc dot gnu dot org
@ 2008-12-03 17:33 ` joel at gcc dot gnu dot org
  2008-12-03 17:41 ` joel at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: joel at gcc dot gnu dot org @ 2008-12-03 17:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from joel at gcc dot gnu dot org  2008-12-03 17:32 -------
At -O1, there was a core dump.

(gdb) run -f psim_tree.joel
/home/joel/test-gcc/gcc-svn/gcc/testsuite/ada/acats/work-psim/tests/a/a22006c/a22006c
Starting program: /home/joel/test-gcc/install/bin/powerpc-rtems4.10-run -f
psim_tree.joel
/home/joel/test-gcc/gcc-svn/gcc/testsuite/ada/acats/work-psim/tests/a/a22006c/a22006c

Program received signal SIGSEGV, Segmentation fault.
0x000000000040304a in psim_last_cpu ()
(gdb) bt
#0  0x000000000040304a in psim_last_cpu ()
#1  0x0000000000484268 in idecode_run ()
#2  0x0000000000403b1e in psim_run ()
#3  0x0000000000402990 in main ()
(gdb) 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] psim miscompiled [regression]
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-12-03 17:33 ` joel at gcc dot gnu dot org
@ 2008-12-03 17:41 ` joel at gcc dot gnu dot org
  2008-12-03 18:54 ` steven at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: joel at gcc dot gnu dot org @ 2008-12-03 17:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from joel at gcc dot gnu dot org  2008-12-03 17:40 -------
Works with -fno-strict-aliasing added.

Core dumps at -O1

Works at -O0.

Is there anything I can do to narrow this down further?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] psim miscompiled [regression]
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-12-03 17:41 ` joel at gcc dot gnu dot org
@ 2008-12-03 18:54 ` steven at gcc dot gnu dot org
  2008-12-03 20:34 ` joel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: steven at gcc dot gnu dot org @ 2008-12-03 18:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from steven at gcc dot gnu dot org  2008-12-03 18:53 -------
You can enable the aliasing warnings (-Wstrict-aliasing=2) and see if there are
warnings when compiling psim.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] psim miscompiled [regression]
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2008-12-03 18:54 ` steven at gcc dot gnu dot org
@ 2008-12-03 20:34 ` joel at gcc dot gnu dot org
  2008-12-03 20:37 ` joel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: joel at gcc dot gnu dot org @ 2008-12-03 20:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from joel at gcc dot gnu dot org  2008-12-03 20:33 -------
Created an attachment (id=16822)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16822&action=view)
Warning log from gdb build

This is "grep warning build.log | sort -u" from a build with
-Wstrict-aliasing=2


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] psim miscompiled [regression]
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2008-12-03 20:34 ` joel at gcc dot gnu dot org
@ 2008-12-03 20:37 ` joel at gcc dot gnu dot org
  2008-12-09 20:12 ` joel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: joel at gcc dot gnu dot org @ 2008-12-03 20:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from joel at gcc dot gnu dot org  2008-12-03 20:35 -------
I have attached e.log which contains the warnings.  All of the warnings in 
ppc-instructions are for taking the address of a double and casting it as 
an unsigned64 *.

ld-insn.c:814 is a print so that's irrelevant.

I could probably fix the warnings in ppc-instructions by defining a union
with a double and unsigned64, using the double field and taking the address
of the unsigned64 field.  But I don't that it is related.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] psim miscompiled [regression]
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2008-12-03 20:37 ` joel at gcc dot gnu dot org
@ 2008-12-09 20:12 ` joel at gcc dot gnu dot org
  2008-12-09 20:48 ` [Bug c/38387] [4.4 Regression] psim miscompiled rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: joel at gcc dot gnu dot org @ 2008-12-09 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from joel at gcc dot gnu dot org  2008-12-09 20:11 -------
I wondered if I had a mistake in my testing since some of the later results
didn't make sense as I thought about them.  I am pretty convinced now this 
is NOT a strict aliasing problem in psim.  

Broken when configuring GDB with:

(CFLAGS="-Wstrict-aliasing=2 -O2 -Wno-error -fno-strict-aliasing"
~/old/test-gcc/gdb-6.8/configure --disable-werror --target=powerpc-rtems4.10
--enable-sim --enable-sim-hardware --enable-timebase --enable-sim-trace
--prefix=/n/12/joel/test-gcc/install/

$ gcc --version
gcc (GCC) 4.4.0 20081205 (experimental) [trunk revision 142492]


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] [4.4 Regression] psim miscompiled
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2008-12-09 20:12 ` joel at gcc dot gnu dot org
@ 2008-12-09 20:48 ` rguenth at gcc dot gnu dot org
  2008-12-09 23:38 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-09 20:48 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|psim miscompiled            |[4.4 Regression] psim
                   |[regression]                |miscompiled
   Target Milestone|---                         |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] [4.4 Regression] psim miscompiled
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2008-12-09 20:48 ` [Bug c/38387] [4.4 Regression] psim miscompiled rguenth at gcc dot gnu dot org
@ 2008-12-09 23:38 ` rguenth at gcc dot gnu dot org
  2008-12-10 15:05 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-09 23:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from rguenth at gcc dot gnu dot org  2008-12-09 23:31 -------
Can you at least reduce this to a single source file of psim that is
miscompiled
and attach preprocessed source for that file (maybe even hinting which
function is affected - if it happens to still miscompile with -fno-inline that
would be useful information).


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] [4.4 Regression] psim miscompiled
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2008-12-09 23:38 ` rguenth at gcc dot gnu dot org
@ 2008-12-10 15:05 ` jakub at gcc dot gnu dot org
  2008-12-10 17:15 ` joel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-12-10 15:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from jakub at gcc dot gnu dot org  2008-12-10 15:03 -------
A binary search between -O2 and -O0 compiled objects should be pretty quick.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] [4.4 Regression] psim miscompiled
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2008-12-10 15:05 ` jakub at gcc dot gnu dot org
@ 2008-12-10 17:15 ` joel at gcc dot gnu dot org
  2009-01-19 23:28 ` hjl dot tools at gmail dot com
  2009-01-19 23:29 ` hjl dot tools at gmail dot com
  16 siblings, 0 replies; 18+ messages in thread
From: joel at gcc dot gnu dot org @ 2008-12-10 17:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from joel at gcc dot gnu dot org  2008-12-10 17:13 -------
My native compiler got updated as part of an RTEMS test sweep to:

gcc (GCC) 4.4.0 20081209 (experimental) [trunk revision 142610]

I can't reproduce this failure at all now.

I am guessing this was the same as another problem that got fixed. Is there
something that changed between a 3 Dec x86_64 target and now?


-- 

joel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] [4.4 Regression] psim miscompiled
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2008-12-10 17:15 ` joel at gcc dot gnu dot org
@ 2009-01-19 23:28 ` hjl dot tools at gmail dot com
  2009-01-19 23:29 ` hjl dot tools at gmail dot com
  16 siblings, 0 replies; 18+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-19 23:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from hjl dot tools at gmail dot com  2009-01-19 23:28 -------
This isn't really fixed.


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WORKSFORME                  |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug c/38387] [4.4 Regression] psim miscompiled
  2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2009-01-19 23:28 ` hjl dot tools at gmail dot com
@ 2009-01-19 23:29 ` hjl dot tools at gmail dot com
  16 siblings, 0 replies; 18+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-19 23:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from hjl dot tools at gmail dot com  2009-01-19 23:29 -------


*** This bug has been marked as a duplicate of 38587 ***


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38387


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-01-19 23:29 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-03 16:53 [Bug c/38387] New: psim miscompiled [regression] joel at gcc dot gnu dot org
2008-12-03 16:55 ` [Bug c/38387] " joel at gcc dot gnu dot org
2008-12-03 17:06 ` rguenth at gcc dot gnu dot org
2008-12-03 17:09 ` joel at gcc dot gnu dot org
2008-12-03 17:10 ` joel dot sherrill at oarcorp dot com
2008-12-03 17:23 ` joel at gcc dot gnu dot org
2008-12-03 17:33 ` joel at gcc dot gnu dot org
2008-12-03 17:41 ` joel at gcc dot gnu dot org
2008-12-03 18:54 ` steven at gcc dot gnu dot org
2008-12-03 20:34 ` joel at gcc dot gnu dot org
2008-12-03 20:37 ` joel at gcc dot gnu dot org
2008-12-09 20:12 ` joel at gcc dot gnu dot org
2008-12-09 20:48 ` [Bug c/38387] [4.4 Regression] psim miscompiled rguenth at gcc dot gnu dot org
2008-12-09 23:38 ` rguenth at gcc dot gnu dot org
2008-12-10 15:05 ` jakub at gcc dot gnu dot org
2008-12-10 17:15 ` joel at gcc dot gnu dot org
2009-01-19 23:28 ` hjl dot tools at gmail dot com
2009-01-19 23:29 ` hjl dot tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).