annotate gcc/testsuite/gcc.dg/tree-ssa/20070815.c @ 131:84e7813d76e9

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