Bug 12572 - FAIL: debug_msg.sh
Summary: FAIL: debug_msg.sh
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: 2.22
: P2 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-11 18:42 UTC by H.J. Lu
Modified: 2011-03-11 21:42 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Fix the debug_msg.sh test. (1.00 KB, patch)
2011-03-11 19:18 UTC, Jeffrey Yasskin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2011-03-11 18:42:32 UTC
On Fedora 14/x86-64, I got

FAIL: debug_msg.sh (exit: 1)
============================

Did not find expected error in debug_msg.err:
   odr_violation2.cc:9
Comment 1 Jeffrey Yasskin 2011-03-11 19:18:55 UTC
Created attachment 5296 [details]
Fix the debug_msg.sh test.

I can reproduce this by switching from Ubuntu Lucid's native gcc-4.4.3 to gcc-4.6-svn, probably because they optimize different instructions into the front of Ordering::operator(). One fix is to add a comment just before that function, so that all its line numbers are two digits, which will cause detect_odr_violations() to sort a consistent line into the first place, regardless of gcc optimizes it.

Here's a patch that passes with both gcc-4.4.3 and gcc-4.6-svn.
Comment 2 cvs-commit@gcc.gnu.org 2011-03-11 21:42:15 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	ian@sourceware.org	2011-03-11 21:42:12

Modified files:
	gold           : ChangeLog 
	gold/testsuite : debug_msg.sh odr_violation2.cc 

Log message:
	PR gold/12572
	* testsuite/odr_violation2.cc: Add comment to make all error line
	numbers double digits.
	* testsuite/debug_msg.sh: Adjust expected errors.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.704&r2=1.705
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/testsuite/debug_msg.sh.diff?cvsroot=src&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/testsuite/odr_violation2.cc.diff?cvsroot=src&r1=1.3&r2=1.4
Comment 3 Ian Lance Taylor 2011-03-11 21:42:53 UTC
Should be fixed now.