This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/16589] New: segmentation fault on identical array accesses in the ?: operators' body


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]