re PR c/89340 (ICE in function_and_variable_visibility, at ipa-visibility.c:707)
authorJakub Jelinek <jakub@redhat.com>
Fri, 15 Feb 2019 07:38:09 +0000 (08:38 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 15 Feb 2019 07:38:09 +0000 (08:38 +0100)
commit5f88ba10e017ec213b0fc4e1b0cd63f3dfcb6660
treec20914b1d6a929372243af28a01055edaba9e6ec
parentf521d9d8ad83137bd2965556f2395a264efa80d7
re PR c/89340 (ICE in function_and_variable_visibility, at ipa-visibility.c:707)

PR c/89340
* c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
before c_decl_attributes rather than after it.

* gcc.dg/pr89340.c: New test.
* gcc.dg/torture/pr57036-2.c (jpgDecode_convert): Expect a warning
that leaf attribute on nested function is useless.

From-SVN: r268926
gcc/c/ChangeLog
gcc/c/c-decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr89340.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr57036-2.c