Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/inline-16.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
/* { dg-do link } */ /* { dg-options "-std=c99" } */ static inline __SIZE_TYPE__ func1(const volatile void * base, __SIZE_TYPE__ byteOffset) { volatile __SIZE_TYPE__ *addr = (volatile __SIZE_TYPE__ *)((__SIZE_TYPE__)base + byteOffset); return *addr; } static inline __SIZE_TYPE__ func2(__SIZE_TYPE__ data) { return func1(&data, 0); } int main(int argc, char *argv[]) { __SIZE_TYPE__ b = func2(argc); return 0; }