String merging is conditionalized on -fmerge-constants, which is turned off for
-O0. This is wasteful of space in .debug_info with optimization disabled, on
targets which support string merging. I don't know if it's faster or not; in
the long run, I suspect it's slower, because binaries get so much larger.
If others agree, perhaps the default should be to merge debug info but not
runtime constants. Or maybe to merge constants by default; I'm not sure
guarding it by !optimize is generally useful.
This is not a regression, I believe.
--
Summary: .debug_str is used only when optimizing
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: drow at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28064