Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/Warray-bounds-33.c @ 144:8f4e72ab4e11
fix segmentation fault caused by nothing next cur_op to end
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 23 Dec 2018 21:23:56 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line source
/* PR tree-optimization/86741 - ICE in -Warray-bounds indexing into an object of incomplete type { dg-do compile } { dg-options "-O2 -Wall" } */ struct S { int s; }; void f (void); void test_void (void) { extern void v; struct S *b = (struct S*)&v; if (b->s) f (); } void test_incomplete_enum (void) { extern enum E e; struct S *b = (struct S*)&e; if (b->s) f (); } void test_func (void) { struct S *b = (struct S*)&f; if (b->s) f (); } /* { dg-prune-output "taking address of expression of type .void." } */