public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC
@ 2004-06-09 3:24 sugioka at itonet dot co dot jp
2004-06-09 3:26 ` [Bug target/15886] " sugioka at itonet dot co dot jp
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: sugioka at itonet dot co dot jp @ 2004-06-09 3:24 UTC (permalink / raw)
To: gcc-bugs
Gcc-3.4.1 generates wrong code when compiling attached code with '-O2 -fPIC'.
Adding -fno-regmove fixes this.
Compile:
$ sh-linux-gcc -O2 -fPIC -S dl-open.i
Miscompiled source code:
args.caller_dl_open = __builtin_extract_return_addr (__builtin_return_address
(0));
Generated wrong code:
mov r4,r11
[snip]
sts pr,r0
[snip]
mov.l r11,@(12,r14) --- original pr should be stored to @(12,r14)
Correct code (-O2 -fPIC -fno-regmove):
sts pr,r10
[snip]
mov.l r10,@(12,r14)
--
Summary: [3.4.1] SH: Miscompilation with -O2 -fPIC
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sugioka at itonet dot co dot jp
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sh-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.4.1] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
@ 2004-06-09 3:26 ` sugioka at itonet dot co dot jp
2004-06-09 3:28 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: sugioka at itonet dot co dot jp @ 2004-06-09 3:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From sugioka at itonet dot co dot jp 2004-06-09 03:26 -------
Created an attachment (id=6496)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6496&action=view)
testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.4.1] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
2004-06-09 3:26 ` [Bug target/15886] " sugioka at itonet dot co dot jp
@ 2004-06-09 3:28 ` pinskia at gcc dot gnu dot org
2004-06-11 2:12 ` kkojima at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-09 3:28 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.4.1] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
2004-06-09 3:26 ` [Bug target/15886] " sugioka at itonet dot co dot jp
2004-06-09 3:28 ` pinskia at gcc dot gnu dot org
@ 2004-06-11 2:12 ` kkojima at gcc dot gnu dot org
2004-06-11 5:58 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2004-06-11 2:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kkojima at gcc dot gnu dot org 2004-06-11 02:12 -------
FYI, I could find a reduced testcase and analyze it. See
http://gcc.gnu.org/ml/gcc/2004-06/msg00721.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.4.1] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
` (2 preceding siblings ...)
2004-06-11 2:12 ` kkojima at gcc dot gnu dot org
@ 2004-06-11 5:58 ` pinskia at gcc dot gnu dot org
2004-06-11 13:07 ` giovannibajo at libero dot it
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-11 5:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-11 05:58 -------
Kazumoto Kojima confirmed and analyzed it already.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-06-11 05:58:22
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.4.1] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
` (3 preceding siblings ...)
2004-06-11 5:58 ` pinskia at gcc dot gnu dot org
@ 2004-06-11 13:07 ` giovannibajo at libero dot it
2004-06-11 14:11 ` kkojima at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: giovannibajo at libero dot it @ 2004-06-11 13:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-06-11 13:07 -------
KK, is this a regression? In your message you say that mainline and 3.4 exhibit
the bug, but can you test it also on an older version?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |kkojima at gcc dot gnu dot
| |org
Known to fail| |3.4.0 3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.4.1] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
` (4 preceding siblings ...)
2004-06-11 13:07 ` giovannibajo at libero dot it
@ 2004-06-11 14:11 ` kkojima at gcc dot gnu dot org
2004-06-11 14:17 ` [Bug target/15886] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: kkojima at gcc dot gnu dot org @ 2004-06-11 14:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kkojima at gcc dot gnu dot org 2004-06-11 14:11 -------
Yep. I've confirmed that 3.3.4 has the same problem and 3.2.3 doesn't.
So this is a regression from 3.2.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.3/3.4/3.5 Regression] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
` (5 preceding siblings ...)
2004-06-11 14:11 ` kkojima at gcc dot gnu dot org
@ 2004-06-11 14:17 ` pinskia at gcc dot gnu dot org
2004-06-11 15:27 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-11 14:17 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |3.2.3
Summary|[3.4.1] SH: Miscompilation |[3.3/3.4/3.5 Regression] SH:
|with -O2 -fPIC |Miscompilation with -O2 -
| |fPIC
Target Milestone|--- |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.3/3.4/3.5 Regression] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
` (6 preceding siblings ...)
2004-06-11 14:17 ` [Bug target/15886] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-06-11 15:27 ` pinskia at gcc dot gnu dot org
2004-06-11 18:15 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-11 15:27 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.1 |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.3/3.4/3.5 Regression] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
` (7 preceding siblings ...)
2004-06-11 15:27 ` pinskia at gcc dot gnu dot org
@ 2004-06-11 18:15 ` cvs-commit at gcc dot gnu dot org
2004-08-23 20:58 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-11 18:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-06-11 18:15 -------
Subject: Bug 15886
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: amylaar@gcc.gnu.org 2004-06-11 18:15:38
Modified files:
gcc : ChangeLog
Log message:
Add PR number in:
PR 15886:
* sh.h (ALLOCATE_INITIAL_VALUE): Use return_address_pointer_rtx.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3925&r2=2.3926
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.3/3.4/3.5 Regression] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
` (8 preceding siblings ...)
2004-06-11 18:15 ` cvs-commit at gcc dot gnu dot org
@ 2004-08-23 20:58 ` mmitchel at gcc dot gnu dot org
2004-09-09 2:18 ` cvs-commit at gcc dot gnu dot org
2004-09-09 2:33 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-23 20:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-08-23 20:58 -------
Postponed until GCC 3.4.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.2 |3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.3/3.4/3.5 Regression] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
` (9 preceding siblings ...)
2004-08-23 20:58 ` mmitchel at gcc dot gnu dot org
@ 2004-09-09 2:18 ` cvs-commit at gcc dot gnu dot org
2004-09-09 2:33 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-09 2:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-09-09 02:18 -------
Subject: Bug 15886
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: kkojima@gcc.gnu.org 2004-09-09 02:18:15
Modified files:
gcc : ChangeLog
gcc/config/sh : sh.h
Log message:
PR 15886
Backport from mainline:
2004-06-11 J"orn Rennecke <joern.rennecke@superh.com>
* sh.h (ALLOCATE_INITIAL_VALUE): Use return_address_pointer_rtx.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.616&r2=2.2326.2.617
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sh/sh.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.230.4.3&r2=1.230.4.4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/15886] [3.3/3.4/3.5 Regression] SH: Miscompilation with -O2 -fPIC
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
` (10 preceding siblings ...)
2004-09-09 2:18 ` cvs-commit at gcc dot gnu dot org
@ 2004-09-09 2:33 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-09 2:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-09 02:33 -------
Fixed in 3.4.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to fail|3.4.0 3.5.0 |3.4.0
Known to work|3.2.3 |3.2.3 3.4.3
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15886
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2004-09-09 2:33 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-09 3:24 [Bug target/15886] New: [3.4.1] SH: Miscompilation with -O2 -fPIC sugioka at itonet dot co dot jp
2004-06-09 3:26 ` [Bug target/15886] " sugioka at itonet dot co dot jp
2004-06-09 3:28 ` pinskia at gcc dot gnu dot org
2004-06-11 2:12 ` kkojima at gcc dot gnu dot org
2004-06-11 5:58 ` pinskia at gcc dot gnu dot org
2004-06-11 13:07 ` giovannibajo at libero dot it
2004-06-11 14:11 ` kkojima at gcc dot gnu dot org
2004-06-11 14:17 ` [Bug target/15886] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-06-11 15:27 ` pinskia at gcc dot gnu dot org
2004-06-11 18:15 ` cvs-commit at gcc dot gnu dot org
2004-08-23 20:58 ` mmitchel at gcc dot gnu dot org
2004-09-09 2:18 ` cvs-commit at gcc dot gnu dot org
2004-09-09 2:33 ` 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).