diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-01-07 23:55:48 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-01-07 23:55:48 +0100 |
commit | c4581bbfb4a20bce2fb9d9dace1f30e4d5a494e8 (patch) | |
tree | 811169e27ff0b6859fe311ad5efb35c4b677067e /gcc/c/c-decl.c | |
parent | 2d8d93c783dd43769075fa0474d670f6fb4a85f1 (diff) | |
download | gcc-c4581bbfb4a20bce2fb9d9dace1f30e4d5a494e8.zip gcc-c4581bbfb4a20bce2fb9d9dace1f30e4d5a494e8.tar.gz gcc-c4581bbfb4a20bce2fb9d9dace1f30e4d5a494e8.tar.bz2 |
re PR c/88701 (Internal compiler error for valid program using compound literal with variably modified type.)
PR c/88701
* c-decl.c (build_compound_literal): If not TREE_STATIC, only pushdecl
if current_function_decl is non-NULL.
* gcc.dg/pr88701.c: New test.
From-SVN: r267667
Diffstat (limited to 'gcc/c/c-decl.c')
-rw-r--r-- | gcc/c/c-decl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 5c7232f..57049f8 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -5438,7 +5438,7 @@ build_compound_literal (location_t loc, tree type, tree init, bool non_const, pushdecl (decl); rest_of_decl_compilation (decl, 1, 0); } - else + else if (current_function_decl) pushdecl (decl); if (non_const) |