Closed mewmew closed 8 years ago
Global variable declarations are added twice, thus resulting in incorrect mapping of tentative definitions.
Proof of concept based on revision mewmew/uc@25bc47e.
Got:
u@x1 ~/D/g/s/g/m/u/foo> uclang a.c Compiling "a.c" ident.Start() 4 def.Start() 4 Log:irgen.go:435: create global variable int x; ident.Start() 11 def.Start() 11 Log:irgen.go:435: create global variable int x;
Expected:
u@x1 ~/D/g/s/g/m/u/foo> uclang a.c Compiling "a.c" ident.Start() 4 def.Start() 11 Log:irgen.go:431: ignoring tentative global variable definition of x ident.Start() 11 def.Start() 11 Log:irgen.go:435: create global variable int x;
Fixed in rev 8208eb1.
Global variable declarations are added twice, thus resulting in incorrect mapping of tentative definitions.
Proof of concept based on revision mewmew/uc@25bc47e.
Got:
Expected: