https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81824
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=81854 --- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> --- The challenge here is that the alias target may not be in scope at the point of the alias declaration, so while the test case in comment #0 could be detected by enhancing the handle_alias_attribute function in c-family/c-attribs.c, one where the declaration order is reversed as in the following could not be: void foo (void) __attribute__ ((nothrow, weak, alias ("__foo"))); void __foo (void) { } Bug 81854 suggests that there is a way to detect this in handle_alias_pairs() in cgraphunit.c.