Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr52445.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 | 04ced10e8804 |
children |
line wrap: on
line source
/* PR tree-optimization/52445 */ /* { dg-do compile } */ /* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim" } */ void foo (char *buf, unsigned long len) { buf[0] = '\n'; if (len > 1) buf[1] = '\0'; /* We can't cselim "optimize" this, while buf[0] doesn't trap, buf[1] could. */ } /* { dg-final { scan-tree-dump-not "cstore\." "cselim" } } */