1 /* { dg-do compile } */ 2 /* { dg-options "-O -w" } */ 3 4 /* This code snippet from glibc 2.3.5 was causing an ICE during 5 optimization because we were failing to update the SSA form for 6 stale name tags. These are tags that are associated with SSA pointers 7 that have been removed from the IL. This was causing the SSA 8 verifier to fail before we had a chance to run the cleanup pass that 9 finally removes all the remaining PHI nodes for the stale name tag. */ 10 struct _IO_wide_data 11 { 12 }; 13 struct _IO_FILE { 14 }; 15 typedef struct _IO_FILE _IO_FILE; 16 struct _IO_jump_t 17 { 18 }; 19 struct _IO_FILE_plus 20 { 21 _IO_FILE file; 22 }; 23 extern const struct _IO_jump_t _IO_file_jumps_maybe_mmap ; 24 extern const struct _IO_jump_t _IO_wfile_jumps; 25 extern const struct _IO_jump_t _IO_wfile_jumps_maybe_mmap ; 26 _IO_new_fdopen(fd,mode)27_IO_new_fdopen (fd, mode) 28 const char *mode; 29 { 30 int read_write; 31 int posix_mode = 0; 32 struct locked_FILE 33 { 34 struct _IO_FILE_plus fp; 35 struct _IO_wide_data wd; 36 } *new_f; 37 int fd_flags; 38 int use_mmap = 0; 39 { 40 } 41 { 42 switch (*++mode) 43 { 44 case '\0': 45 use_mmap = 1; 46 } 47 } 48 if (((fd_flags & 0003) == 00 && !(read_write & 8)) 49 || ((fd_flags & 0003) == 01 && !(read_write & 4))) 50 { 51 } 52 if ((posix_mode & 02000) && !(fd_flags & 02000)) 53 return ((void *)0); 54 _IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, 55 (use_mmap && (read_write & 8)) 56 ? &_IO_wfile_jumps_maybe_mmap : 57 &_IO_wfile_jumps); 58 (use_mmap && (read_write & 8)) ? &_IO_file_jumps_maybe_mmap : 59 _IO_file_init (&new_f->fp); 60 } 61