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/] [pr42691.c] - Rev 297
Compare with Previous | Blame | View Log
extern void abort (void); union _D_rep { unsigned short rep[4]; double val; }; int add(double* key, double* table) { unsigned i = 0; double* deletedEntry = 0; while (1) { double* entry = table + i; if (*entry == *key) break; union _D_rep _D_inf = {{ 0, 0, 0, 0x7ff0 }}; if (*entry != _D_inf.val) abort (); union _D_rep _D_inf2 = {{ 0, 0, 0, 0x7ff0 }}; if (!_D_inf2.val) deletedEntry = entry; i++; } if (deletedEntry) *deletedEntry = 0.0; return 0; } int main () { union _D_rep infinit = {{ 0, 0, 0, 0x7ff0 }}; double table[2] = { infinit.val, 23 }; double key = 23; int ret = add (&key, table); return ret; }