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

            Bug ID: 88968
           Summary: [8/9 Regression] Stack overflow in gimplify_expr
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openmp
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-9.0.0-alpha20190120 snapshot (r268107) demonstrates stack overflow when
compiling the following snippet w/ -fopenmp:

struct {
  unsigned int hq : 16;
  unsigned int dv : 1;
} __attribute__ ((__packed__)) e2;

void
yp (void)
{
#pragma omp atomic
  ++e2.hq;
}

% gcc-9.0.0-alpha20190120 -fopenmp -c gqqutwbw.c
gcc-9.0.0-alpha20190120: internal compiler error: Segmentation fault signal
terminated program cc1

==18746== Stack overflow in thread #1: can't grow stack to 0x1ffe001000
==18746== Can't extend stack to 0x1ffe000fd8 during signal delivery for thread
1:
==18746==   no stack segment
==18746== 
==18746== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==18746==  Access not within mapped region at address 0x1FFE000FD8
==18746== Stack overflow in thread #1: can't grow stack to 0x1ffe001000
==18746==    at 0xAE6E4B: gimplify_expr(tree_node**, gimple**, gimple**, bool
(*)(tree_node*), int) (gimplify.c:13292)
==18746==  If you believe this happened as a result of a stack
==18746==  overflow in your program's main thread (unlikely but
==18746==  possible), you can try to increase the size of the
==18746==  main thread stack using the --main-stacksize= flag.
==18746==  The main thread stack size used in this run was 16777216.

Reply via email to