public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/11975] New: gcc miscompiles natClassLoader.cc with -fnon-call-exceptions
@ 2003-08-19  5:11 tausq at debian dot org
  2003-08-19  5:12 ` [Bug optimization/11975] " tausq at debian dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tausq at debian dot org @ 2003-08-19  5:11 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: gcc miscompiles natClassLoader.cc with -fnon-call-
                    exceptions
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tausq at debian dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: hppa-unknown-linux
  GCC host triplet: hppa-unknown-linux
GCC target triplet: hppa-unknown-linux

While trying to build libjava for hppa-linux, i ran into a few cases where gcc
built code that segfaults when run. One example is attached -- this code was
extracted from natClassLoader.cc, when built with -fnon-call-exceptions, gcc
emits an insn:

       ldw RT'loaded_classes(%r25),%r25

but r25 is never initialized. It looks like the gcse pass eliminated the
initialization of r25

The complete build command was:
gcc -fno-rtti -fdollars-in-identifiers -Wswitch-enum -fnon-call-exceptions -O2
-g -fPIC -S bug.ii

With -fno-gcse, the code looks like:
        .loc 1 48 0
        addil LT'loaded_classes,%r19
        ldw RT'loaded_classes(%r1),%r1

without -fno-gcse
        .loc 1 48 0
        ldw RT'loaded_classes(%r25),%r25


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

* [Bug optimization/11975] gcc miscompiles natClassLoader.cc with -fnon-call-exceptions
  2003-08-19  5:11 [Bug optimization/11975] New: gcc miscompiles natClassLoader.cc with -fnon-call-exceptions tausq at debian dot org
@ 2003-08-19  5:12 ` tausq at debian dot org
  2003-08-28 16:21 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: tausq at debian dot org @ 2003-08-19  5:12 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From tausq at debian dot org  2003-08-19 05:12 -------
Created an attachment (id=4618)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4618&action=view)
test case


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

* [Bug optimization/11975] gcc miscompiles natClassLoader.cc with -fnon-call-exceptions
  2003-08-19  5:11 [Bug optimization/11975] New: gcc miscompiles natClassLoader.cc with -fnon-call-exceptions tausq at debian dot org
  2003-08-19  5:12 ` [Bug optimization/11975] " tausq at debian dot org
@ 2003-08-28 16:21 ` pinskia at gcc dot gnu dot org
  2003-08-29  0:58 ` danglin at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-28 16:21 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia at gcc dot gnu dot org  2003-08-28 16:21 -------
Most likely related to bug 11767.


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

* [Bug optimization/11975] gcc miscompiles natClassLoader.cc with -fnon-call-exceptions
  2003-08-19  5:11 [Bug optimization/11975] New: gcc miscompiles natClassLoader.cc with -fnon-call-exceptions tausq at debian dot org
  2003-08-19  5:12 ` [Bug optimization/11975] " tausq at debian dot org
  2003-08-28 16:21 ` pinskia at gcc dot gnu dot org
@ 2003-08-29  0:58 ` danglin at gcc dot gnu dot org
  2003-10-11  3:02 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: danglin at gcc dot gnu dot org @ 2003-08-29  0:58 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From danglin at gcc dot gnu dot org  2003-08-29 00:58 -------
I did some investigation of the problem and found that the gcc pass
eliminated the initialization of the instruction in question.  It
probably should have eliminated the insn itself.  Possibly, it didn't
because it contains an unspec construct.


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

* [Bug optimization/11975] gcc miscompiles natClassLoader.cc with -fnon-call-exceptions
  2003-08-19  5:11 [Bug optimization/11975] New: gcc miscompiles natClassLoader.cc with -fnon-call-exceptions tausq at debian dot org
                   ` (2 preceding siblings ...)
  2003-08-29  0:58 ` danglin at gcc dot gnu dot org
@ 2003-10-11  3:02 ` pinskia at gcc dot gnu dot org
  2003-12-11  0:30 ` dhazeghi at yahoo dot com
  2003-12-28  3:23 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-11  3:02 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

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


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-11 03:02 -------
Does this happen any more, there was a fix for -fgcse recently to fix a problem like this?


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

* [Bug optimization/11975] gcc miscompiles natClassLoader.cc with -fnon-call-exceptions
  2003-08-19  5:11 [Bug optimization/11975] New: gcc miscompiles natClassLoader.cc with -fnon-call-exceptions tausq at debian dot org
                   ` (3 preceding siblings ...)
  2003-10-11  3:02 ` pinskia at gcc dot gnu dot org
@ 2003-12-11  0:30 ` dhazeghi at yahoo dot com
  2003-12-28  3:23 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-12-11  0:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dhazeghi at yahoo dot com  2003-12-11 00:30 -------
Is this bug still occurring on mainline? I tried taking a look, but my hppa-linux cross-compiler 
outputted assembly somewhat different from what you included :-)

-- 


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


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

* [Bug optimization/11975] gcc miscompiles natClassLoader.cc with -fnon-call-exceptions
  2003-08-19  5:11 [Bug optimization/11975] New: gcc miscompiles natClassLoader.cc with -fnon-call-exceptions tausq at debian dot org
                   ` (4 preceding siblings ...)
  2003-12-11  0:30 ` dhazeghi at yahoo dot com
@ 2003-12-28  3:23 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-28  3:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-12-28 03:08 -------
No feedback in 3 months (T-15 days).

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


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


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

end of thread, other threads:[~2003-12-28  3:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-19  5:11 [Bug optimization/11975] New: gcc miscompiles natClassLoader.cc with -fnon-call-exceptions tausq at debian dot org
2003-08-19  5:12 ` [Bug optimization/11975] " tausq at debian dot org
2003-08-28 16:21 ` pinskia at gcc dot gnu dot org
2003-08-29  0:58 ` danglin at gcc dot gnu dot org
2003-10-11  3:02 ` pinskia at gcc dot gnu dot org
2003-12-11  0:30 ` dhazeghi at yahoo dot com
2003-12-28  3:23 ` pinskia at gcc dot gnu dot org

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).