libfirm / cparser

C99 parser and frontend for libfirm
http://pp.ipd.kit.edu/firm
GNU General Public License v2.0
336 stars 38 forks source link

cparser fails to produce working assembly code for alias when using extern #38

Open GabrielRavier opened 4 years ago

GabrielRavier commented 4 years ago
int f;
extern typeof(f) bar __attribute__((alias("f")));

cparser outputs this :

test.c:2:12: warning: extern storage class ignored for alias variable 'bar' [-Wother]
warning: the amd64 backend is experimental and unfinished (consider the ia32 backend) [-Wexperimental]
/tmp/QhC47s/a-0.s: Assembler messages:
/tmp/QhC47s/a-0.s:4: Error: `bar' can't be equated to common symbol `f'
/tmp/QhC47s/a-0.s: error: assembler reported an error
1 error(s), 2 warning(s)