Change SometimesInlineFunction to "return i * i * 3;"
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 20 Dec 2014 16:05:45 +0000 (08:05 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 20 Dec 2014 16:05:45 +0000 (08:05 -0800)
commitbd040da1dbb7e6640440f306ddf993af98441851
treecef69a986dea3567a54839d51aaf05ca3be409b1
parent13a1997e6688d79ee01f1b082f7a220901c8cf34
Change SometimesInlineFunction to "return i * i * 3;"

The debug_msg test has 2 implementations of SometimesInlineFunction:

int SometimesInlineFunction(int i) { return i; }
int SometimesInlineFunction(int i) { return i * i; }

and One Definition Rule (ODR) violation detection expects they will be
compiled into functions of different sizes.  Hower, on x86, GCC 4.7 and
newer compile them into functions of the same size and ODR violation
detection test fails.  This patch changes

int SometimesInlineFunction(int i) { return i; }

to

int SometimesInlineFunction(int i) { return i * i * 3; }

so that it will be compiled into a function of larger size.

PR gold/14608
* testsuite/debug_msg.cc (SometimesInlineFunction): Changed
to "return i * i * 3;".
gold/ChangeLog
gold/testsuite/debug_msg.cc
This page took 0.025777 seconds and 4 git commands to generate.