[Bug c/90470] New: internal compiler error after multiple declaration of alias in a custom section
guillaume.bertholon at hotmail dot fr
gcc-bugzilla@gcc.gnu.org
Tue May 14 16:47:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90470
Bug ID: 90470
Summary: internal compiler error after multiple declaration of
alias in a custom section
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: guillaume.bertholon at hotmail dot fr
Target Milestone: ---
Created attachment 46352
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46352&action=edit
stderr output of 'gcc -v -c bug.c'
I have recently found a way to generate internal compiler errors with this
simple 2 line code snippet:
extern int alias __attribute__((alias("target")));
extern int alias __attribute__((section(".custom")));
While I admit that this minimal non-working example is useless (and would
generate a compile time error anyway), the exact same bug also occurs inside
more meaningful code with weak aliases inside custom sections, or just when
repeating the same alias declaration twice:
int target __attribute__((section(".custom")));
extern int alias __attribute__((alias("target"),section(".custom")));
extern int alias __attribute__((alias("target"),section(".custom")));
At least versions 10.0 (Debian 20190508-1), 8.3 and 6.3 are affected, 4.9 isn't
and compiles successfully the second code snippet above.
You can see as attachment the full error message with version 10 after
executing 'gcc -v -c bug.c', where bug.c is a file containing the second code
snippet (exact same output for the first one, apart from code quoting).
More information about the Gcc-bugs
mailing list