On Fri, Apr 19, 2013 at 12:05 AM, Cary Coutant <ccout...@google.com> wrote: > 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.
Generated code should not depend on actual values of pointers - which often happens when you traverse a hashtable hashing pointers. Is this what is done here? Then I suggest to hash on something different or sort after sth different before outputting. Richard. > -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] > }