URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20041112-1.c] - Rev 298
Go to most recent revision | Compare with Previous | Blame | View Log
/* This was failing on Alpha because the comparison (p != -1) was rewritten as (p+1 != 0) and p+1 isn't allowed to wrap for pointers. */ extern void abort(void); typedef __SIZE_TYPE__ size_t; int global; static void *foo(int p) { if (p == 0) { global++; return &global; } return (void *)(size_t)-1; } int bar(void) { void *p; p = foo(global); if (p != (void *)(size_t)-1) return 1; global++; return 0; } int main(void) { global = 1; if (bar () != 0) abort(); return 0; }
Go to most recent revision | Compare with Previous | Blame | View Log