diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-11-04 21:06:33 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-11-04 21:06:33 +0100 |
commit | cbc19f3932ff61af3bce86a4681ffa2efbe96690 (patch) | |
tree | f32a249f4d5af439f025a12c5e338d4006d5b851 /gcc/c-common.c | |
parent | 5c6ed53afc63d941494bb6c9f0640ad7160031b3 (diff) | |
download | gcc-cbc19f3932ff61af3bce86a4681ffa2efbe96690.zip gcc-cbc19f3932ff61af3bce86a4681ffa2efbe96690.tar.gz gcc-cbc19f3932ff61af3bce86a4681ffa2efbe96690.tar.bz2 |
re PR c/37106 (ICE with -fpic or -fPIC: in mems_in_disjoint_alias_sets_p, at alias.c:278)
PR c/37106
* c-common.c (parse_optimize_options): Save and restore
flag_strict_aliasing around decode_options call.
* gcc.dg/pr37106-1.c: New test.
* gcc.dg/pr37106-2.c: New test.
From-SVN: r141584
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index 84dea11..3a97bd7 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -6979,6 +6979,7 @@ parse_optimize_options (tree args, bool attr_p) bool ret = true; unsigned opt_argc; unsigned i; + int saved_flag_strict_aliasing; const char **opt_argv; tree ap; @@ -7069,9 +7070,14 @@ parse_optimize_options (tree args, bool attr_p) for (i = 1; i < opt_argc; i++) opt_argv[i] = VEC_index (const_char_p, optimize_args, i); + saved_flag_strict_aliasing = flag_strict_aliasing; + /* Now parse the options. */ decode_options (opt_argc, opt_argv); + /* Don't allow changing -fstrict-aliasing. */ + flag_strict_aliasing = saved_flag_strict_aliasing; + VEC_truncate (const_char_p, optimize_args, 0); return ret; } |