public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body
@ 2004-07-16 12:44 loki at inf dot u-szeged dot hu
2004-07-16 13:59 ` [Bug target/16589] [3.5.0 regression] [m68k] " schwab at suse dot de
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: loki at inf dot u-szeged dot hu @ 2004-07-16 12:44 UTC (permalink / raw)
To: gcc-bugs
There is something wrong around the array access on m68k.
If in body of the ?: operator the array "t" is accessed more
than once in same way the compiler'll drop some errors.
I made several crosscompiler, and I only found that m68k-*-elf
doesn't handle the following c code:
float *t, a;
void good()
{
a = (t[0] < 0 ? 0 : (a > 1 ? 1 : t[1]));
}
void bad()
{
a = (t[0] < 0 ? 0 : (a > 1 ? 1 : t[0]));
}
Command line:
m68k-elf-gcc -O1 -o pr.o pr.c
And I got:
pr.c: In function `bad':
pr.c:11: internal compiler error: in output_325, at insn-output.c:3475
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: segmentation fault on identical array accesses in the ?:
operators' body
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: loki at inf dot u-szeged dot hu
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: m68k-unknown-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [3.5.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
@ 2004-07-16 13:59 ` schwab at suse dot de
2004-07-16 14:54 ` schwab at suse dot de
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: schwab at suse dot de @ 2004-07-16 13:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schwab at suse dot de 2004-07-16 13:59 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |schwab at suse dot de
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail| |3.5.0
Known to work| |3.4.2
Last reconfirmed|0000-00-00 00:00:00 |2004-07-16 13:59:03
date| |
Summary|segmentation fault on |[3.5.0 regression] [m68k]
|identical array accesses in |segmentation fault on
|the ?: operators' body |identical array accesses in
| |the ?: operators' body
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [3.5.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
2004-07-16 13:59 ` [Bug target/16589] [3.5.0 regression] [m68k] " schwab at suse dot de
@ 2004-07-16 14:54 ` schwab at suse dot de
2004-07-16 18:36 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: schwab at suse dot de @ 2004-07-16 14:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schwab at suse dot de 2004-07-16 14:54 -------
The problem is that gcc is now using the IEEE aware conditions which only work
with CC in the FPU, but notice_update_cc still sets cc_status for the SET even
if the destination is a DATA_REG in SFmode.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [3.5.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
2004-07-16 13:59 ` [Bug target/16589] [3.5.0 regression] [m68k] " schwab at suse dot de
2004-07-16 14:54 ` schwab at suse dot de
@ 2004-07-16 18:36 ` pinskia at gcc dot gnu dot org
2004-08-31 9:21 ` loki at inf dot u-szeged dot hu
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-16 18:36 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
Keywords| |ice-on-valid-code
Target Milestone|tree-ssa |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [3.5.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
` (2 preceding siblings ...)
2004-07-16 18:36 ` pinskia at gcc dot gnu dot org
@ 2004-08-31 9:21 ` loki at inf dot u-szeged dot hu
2004-09-02 3:39 ` wilson at specifixinc dot com
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: loki at inf dot u-szeged dot hu @ 2004-08-31 9:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From loki at inf dot u-szeged dot hu 2004-08-31 09:21 -------
I have another testcase. Is it a similar problem?
Source:
int bar(float *e)
{
if (!(e[0] > 0 && e[1] > 0))
return 1;
return 0;
}
Command line (version:2004-08-30 12:00:00 UTC):
m68k-elf-gcc -c -O2 pr.i
Output:
pr.i: In function `bar':
pr.i:6: internal compiler error: in output_348, at insn-output.c:3487
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [3.5.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
` (3 preceding siblings ...)
2004-08-31 9:21 ` loki at inf dot u-szeged dot hu
@ 2004-09-02 3:39 ` wilson at specifixinc dot com
2004-10-22 11:44 ` [Bug target/16589] [4.0 " loki at inf dot u-szeged dot hu
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: wilson at specifixinc dot com @ 2004-09-02 3:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From wilson at specifixinc dot com 2004-09-02 03:39 -------
Subject: Re: [3.5.0 regression] [m68k] segmentation fault
on identical array accesses in the ?: operators' body
loki at inf dot u-szeged dot hu wrote:
> ------- Additional Comments From loki at inf dot u-szeged dot hu 2004-08-31 09:21 -------
> I have another testcase. Is it a similar problem?
> pr.i:6: internal compiler error: in output_348, at insn-output.c:3487
Yes, it is the same problem.
By the way, this problem goes away with my flag_trapping_math bug fix
(it should be on by default but is not). However, the underlying
problem remains, and can still be triggered if you use the
-fno-trapping-math option.
The underlying problem seems to be that we have two condition codes, one
integer one and one FP one, and cc_status can only track one of them at
a time. If we clobber cc_status when CC_IN_68881 is set, then this
problem will be fixed, but we won't be able to optimize away FP compares
anymore, and hence there will be some performance loss. However, the
current code looks like it will handle negative-zero incorrectly, and
probably also signalling NaNs, and maybe some other stuff too, so this
may be a good idea anyways in order to fix some IEEE math correctness
problems.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [4.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
` (4 preceding siblings ...)
2004-09-02 3:39 ` wilson at specifixinc dot com
@ 2004-10-22 11:44 ` loki at inf dot u-szeged dot hu
2004-10-22 13:44 ` schwab at suse dot de
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: loki at inf dot u-szeged dot hu @ 2004-10-22 11:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From loki at inf dot u-szeged dot hu 2004-10-22 11:44 -------
The bug has been fixed at Sep 3.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [4.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
` (5 preceding siblings ...)
2004-10-22 11:44 ` [Bug target/16589] [4.0 " loki at inf dot u-szeged dot hu
@ 2004-10-22 13:44 ` schwab at suse dot de
2004-10-22 13:45 ` schwab at suse dot de
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: schwab at suse dot de @ 2004-10-22 13:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schwab at suse dot de 2004-10-22 13:44 -------
See comment #4, this is still not fixed with -fno-trapping-math.
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2004-07-16 13:59:03 |2004-10-22 13:44:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [4.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
` (6 preceding siblings ...)
2004-10-22 13:44 ` schwab at suse dot de
@ 2004-10-22 13:45 ` schwab at suse dot de
2004-10-22 13:47 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: schwab at suse dot de @ 2004-10-22 13:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schwab at suse dot de 2004-10-22 13:45 -------
See last comment.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [4.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
` (7 preceding siblings ...)
2004-10-22 13:45 ` schwab at suse dot de
@ 2004-10-22 13:47 ` pinskia at gcc dot gnu dot org
2004-12-01 18:19 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-22 13:47 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [4.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
` (8 preceding siblings ...)
2004-10-22 13:47 ` pinskia at gcc dot gnu dot org
@ 2004-12-01 18:19 ` pinskia at gcc dot gnu dot org
2004-12-03 12:25 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-01 18:19 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [4.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
` (9 preceding siblings ...)
2004-12-01 18:19 ` pinskia at gcc dot gnu dot org
@ 2004-12-03 12:25 ` steven at gcc dot gnu dot org
2005-01-21 17:32 ` mmitchel at gcc dot gnu dot org
2005-03-05 19:48 ` [Bug target/16589] [4.0/4.1 " pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-03 12:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-12-03 12:25 -------
Is the remaining bug a regression? In fact, is this a regression at all
or merely a bug that was latent and somehow got exposed now? Andreas,
are you going to post your patch from comment #5?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [4.0 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
` (10 preceding siblings ...)
2004-12-03 12:25 ` steven at gcc dot gnu dot org
@ 2005-01-21 17:32 ` mmitchel at gcc dot gnu dot org
2005-03-05 19:48 ` [Bug target/16589] [4.0/4.1 " pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-01-21 17:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-01-21 17:31 -------
m68k is not a primary or secondary target; removing target milestone.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/16589] [4.0/4.1 regression] [m68k] segmentation fault on identical array accesses in the ?: operators' body
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
` (11 preceding siblings ...)
2005-01-21 17:32 ` mmitchel at gcc dot gnu dot org
@ 2005-03-05 19:48 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-05 19:48 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16589
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2005-03-05 19:48 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-16 12:44 [Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body loki at inf dot u-szeged dot hu
2004-07-16 13:59 ` [Bug target/16589] [3.5.0 regression] [m68k] " schwab at suse dot de
2004-07-16 14:54 ` schwab at suse dot de
2004-07-16 18:36 ` pinskia at gcc dot gnu dot org
2004-08-31 9:21 ` loki at inf dot u-szeged dot hu
2004-09-02 3:39 ` wilson at specifixinc dot com
2004-10-22 11:44 ` [Bug target/16589] [4.0 " loki at inf dot u-szeged dot hu
2004-10-22 13:44 ` schwab at suse dot de
2004-10-22 13:45 ` schwab at suse dot de
2004-10-22 13:47 ` pinskia at gcc dot gnu dot org
2004-12-01 18:19 ` pinskia at gcc dot gnu dot org
2004-12-03 12:25 ` steven at gcc dot gnu dot org
2005-01-21 17:32 ` mmitchel at gcc dot gnu dot org
2005-03-05 19:48 ` [Bug target/16589] [4.0/4.1 " 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).