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 tree-optimization/71840] New: [7 Regression] internal compiler error: Segmentation fault in compute_avail


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71840

            Bug ID: 71840
           Summary: [7 Regression] internal compiler error: Segmentation
                    fault in compute_avail
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

With the following testcase (derived from libgcc/config/libbid/bid128_fma.c) on
x86_64-pc-linux-gnu I get 

$ ./cc1 -quiet -O2 x.c
x.c: In function ‘foo’:
x.c:24:8: warning: assignment makes integer from pointer without a cast
[-Wint-conversion]
     *p = res;
        ^
x.c:17:1: internal compiler error: Segmentation fault
 foo (S c, int *p)
 ^~~
0xb8566f crash_signal
        /home/marek/src/gcc/gcc/toplev.c:335
0xd1d174 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        /home/marek/src/gcc/gcc/tree.h:3143
0xd1d174 compute_avail
        /home/marek/src/gcc/gcc/tree-ssa-pre.c:3811
0xd1d174 execute
        /home/marek/src/gcc/gcc/tree-ssa-pre.c:4846
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


typedef struct
{
  int w[4];
} S;

extern void res (S *);

void
bar (S x, S *p)
{
  S z;
  if (x.w[2])
    *p = z;
}

void
foo (S c, int *p)
{
  S s;
  res (&s);
  if (c.w[2] || s.w[2])
    bar (s, &s);
  if (s.w[0])
    *p = res;
}

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