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; 18+ 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] 18+ messages in thread
[parent not found: <20040716124408.16589.loki@gcc.gnu.org>]
[parent not found: <bug-16589-5666@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2005-10-30 23:20 UTC | newest]

Thread overview: 18+ 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
     [not found] <20040716124408.16589.loki@gcc.gnu.org>
2005-07-26 23:40 ` steven at gcc dot gnu dot org
2005-08-22  1:42 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-16589-5666@http.gcc.gnu.org/bugzilla/>
2005-10-27 17:59 ` pinskia at gcc dot gnu dot org
2005-10-30 23:21 ` 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).