1 /* This test was supplied with PR target/5379. It caused the compiler 2 to get a segmentation fault. */ 3 4 /* { dg-do compile } */ 5 /* { dg-options "-O2 -fprefetch-loop-arrays -w" } */ 6 /* { dg-additional-options "-march=athlon" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ 7 8 extern int access( char* ); 9 extern int strcmp(const char *s1, const char *s2); 10 extern int a(); 11 char* foocp(); 12 13 void _KDE_IceGetPoValidAuthIndices(protocol_name,num_indices_ret,indices_ret)14_KDE_IceGetPoValidAuthIndices (protocol_name, num_indices_ret, indices_ret) 15 const char *protocol_name; 16 int *num_indices_ret; 17 int *indices_ret; 18 { 19 int auth_file; 20 char *filename; 21 int index_ret, i; 22 23 if (!(filename = foocp ())) 24 return; 25 26 if (access (filename)) 27 return; 28 29 if (auth_file = access (filename)) 30 return; 31 32 for (;;) 33 { 34 if (strcmp (protocol_name, protocol_name) == 0 ) 35 { 36 for (i = 0; i < *num_indices_ret; i++) 37 if (index_ret == indices_ret[i]) 38 break; 39 } 40 } 41 } 42 43