Mercury Bugs - mercury
View Issue Details
0000345mercuryBugpublic2014-07-11 17:142014-07-14 10:20
Reporterwangp 
Assigned To 
PrioritylowSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000345: name mangling produces very long symbols
Descriptiongcc 4.2.0 on on AIX 7.1 happens to crash on very long symbols. I suspect there is a fixed size buffer somewhere about 256 bytes long.

While this is not a bug in Mercury, we may want to use a different name mangling algorithm which produces shorter and, preferably, more readable symbols, e.g. only escaping the characters which are not allowed in C identifiers.
TagsNo tags attached.
Attached Files

Notes
(0000740)
juliensf   
2014-07-11 20:13   
Is that a limitation of that version of GCC (which is quite old), or is it a more fundamental restriction (e.g. the linker only accepts symbol names of a certain length)?
(0000741)
wangp   
2014-07-14 10:15   
That version of gcc crashes during compilation. xlc deals with it fine, and so does the linker.
(0000742)
juliensf   
2014-07-14 10:20   
Can you not just use a more recent version of GCC (i.e one that isn't eight years old)?

In relation to name mangling, we should probably revisit this anyway since there are a series of bugs
with the other backends in relation to it as well.

Issue History
2014-07-11 17:14wangpNew Issue
2014-07-11 20:13juliensfNote Added: 0000740
2014-07-14 10:15wangpNote Added: 0000741
2014-07-14 10:20juliensfNote Added: 0000742