Re: [C PATCH] Reject weak nested functions (PR c/89340)

2019-02-14 Thread Joseph Myers
On Fri, 15 Feb 2019, Jakub Jelinek wrote: > Hi! > > We ICE on the following testcase, because C nested functions are turned into > !TREE_PUBLIC ones very soon, and the IPA code asserts that DECL_WEAK > functions > are either TREE_PUBLIC or DECL_EXTERNAL. > As we reject static __attribute__((wea

[C PATCH] Reject weak nested functions (PR c/89340)

2019-02-14 Thread Jakub Jelinek
Hi! We ICE on the following testcase, because C nested functions are turned into !TREE_PUBLIC ones very soon, and the IPA code asserts that DECL_WEAK functions are either TREE_PUBLIC or DECL_EXTERNAL. As we reject static __attribute__((weak)) void foo () {}, I think we should reject weak nested f