Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr77673.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
/* { dg-do compile { target fpic } } */ /* { dg-require-effective-target bswap } */ /* { dg-options "-O2 -fPIC -fdump-tree-bswap" } */ /* { dg-additional-options "-march=z900" { target s390*-*-* } } */ void mach_parse_compressed(unsigned char* ptr, unsigned long int* val) { if (ptr[0] < 0xC0U) { *val = ptr[0] + ptr[1]; return; } *val = ((unsigned long int)(ptr[0]) << 24) | ((unsigned long int)(ptr[1]) << 16) | ((unsigned long int)(ptr[2]) << 8) | ptr[3]; } /* { dg-final { scan-tree-dump-not "load_dst_\\d+ =.* if \\(" "bswap" } } */