This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch rfa] Fix PCH test failure when -fdebug-types-section is enabled
- From: Cary Coutant <ccoutant at google dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 18 Apr 2013 15:05:26 -0700
- Subject: [patch rfa] Fix PCH test failure when -fdebug-types-section is enabled
If I turn on -fdebug-types-section, I get a failure in the PCH tests:
FAIL: g++.dg/pch/system-2.C -O2 -g assembly comparison
This appears to be the result of differences in hash table traversal
during debug output (same output, slightly different order), so I'm
thinking it's just luck that it works under the default conditions.
The following patch fixes the problem, simply by forcing
-fno-debug-types-section for all PCH tests, but I see no fundamental
reason why that should be necessary. If anyone has any advice for how
to solve the underlying problem, I'd appreciate it.
-cary
Index: lib/dg-pch.exp
===================================================================
--- lib/dg-pch.exp (revision 198068)
+++ lib/dg-pch.exp (working copy)
@@ -139,5 +139,5 @@ proc dg-flags-pch { subdir test otherfla
}
proc dg-pch { subdir test options suffix } {
- return [dg-flags-pch $subdir $test "" $options $suffix]
+ return [dg-flags-pch $subdir $test "-fno-debug-types-section"
$options $suffix]
}