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 c/16712] New: [3.5.0 regression] Segmentation fault when accessing const array


With the following c source (foo.i) I have segmentation fault:
typedef struct
{
  char n[129];
} A;

const A C = {
  0,
  0
};

extern const A *const B;

void bar(const char *);

void foo ()
{
  bar (B->n);
}

const A *const B = &C;

Command line:
*gcc -c -O2 -o foo.i foo.c

Output:
foo.i: In function `foo':
foo.i:16: internal compiler error: Segmentation fault

-- 
           Summary: [3.5.0 regression] Segmentation fault when accessing
                    const array
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: c
        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: arm-unknown-elf  i386-unknown-elf m68k-unknown-elf mips-
                    unknown-


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


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