URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [tailcall-6.c] - Rev 689
Compare with Previous | Blame | View Log
/* PR tree-optimization/43904. */ /* { dg-do run } */ /* { dg-options "-O1 -foptimize-sibling-calls" } */ typedef __SIZE_TYPE__ size_t; extern void abort(void); void *memcpy(void *dest, const void *src, size_t n); void buggy_init(void *ptr, size_t size) { const char *str = "Hello world!"; memcpy(ptr, &str, size); } void expose_bug(void *ptr, size_t size) { const char *str; memcpy(&str, ptr, size); if (*str != 'H') abort (); } int main() { const char *ptr; buggy_init(&ptr, sizeof(ptr)); expose_bug(&ptr, sizeof(ptr)); return 0; }