gcc.c-torture/execute/990208-1.c test failure

Bug #612405 reported by Michael Hope
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro GCC
Fix Released
Low
Yao Qi
Linaro GCC Tracking
Fix Released
Undecided
Yao Qi

Bug Description

Seen in gcc-linaro-4.4+bzr93543 on armv7l only. The gcc testsuite reports:
 FAIL: gcc.c-torture/execute/990208-1.c execution, -Os

See
 http://ex.seabright.co.nz/build/gcc-linaro-4.4-93543/logs/armv7l-maverick-cbuild1-pavo1/gcc-test.txt

Tags: testsuite

Related branches

Revision history for this message
Yao Qi (yao-codesourcery) wrote :

Looks like doit is *not* inlined properly. Root cause is here,

congfig/arm/arm.c:arm_optimization_options(int level, int size ATTRIBUTE_UNUSED)
...
  if (size)
    {
               /* In Thumb mode the function call code size overhead is typically very
  small, and narrow branch instructions have very limited range.
  Inlining even medium sized functions tends to bloat the caller and
  require the use of long branch instructions. On average the long
  branches cost more than eliminating the function call overhead saves,
  so we use extremely restrictive automatic inlining heuristics. In ARM
  mode the results are fairly neutral, probably due to better constant
  pool placement. */
      set_param_value ("max-inline-insns-single", 1);
      set_param_value ("max-inline-insns-auto", 1);
......
    }

Remove two 'set_param_value', problem goes away.

Michael Hope (michaelh1)
tags: added: testsuite
Revision history for this message
Yao Qi (yao-codesourcery) wrote :

Hmm... execute/990208-1.x shows that this case should not be run with -Os on ARM.

# On ARM, with -Os, some of the functions that this test
# expects to be inlined are not inlined for code size
# reasons. This is not a bug, it's intentional,
# so stop this test from running.
set torture_eval_before_compile {
  if { [istarget "arm-*-*"] && [string match {*-Os*} "$option"] } {
    continue
  }
}

Target triplet should be "arm*-*-*", which is more general. Configuration 'target=armv7l-unknown-linux-gnueabi' exposes this bug.

Revision history for this message
Yao Qi (yao-codesourcery) wrote :

execute/990208-1.x is introduced by this patch,

2009-05-28 Julian Brown <email address hidden>

        Merged from Sourcery G++ 4.3:

        2007-09-19 Vladimir Prus <email address hidden>

        gcc/
        * config/arm/arm.c (arm_optimization_options): Disable
        -fmove-loop-invariants. Use very restrictive inlining heuristics.

        gcc/testsuite/
        * gcc.c-torture/execute/bcp-1.x: New. Don't run bcp-1.c test on arm,
        with -Os.
        * gcc.c-torture/execute/990208-1.x: New. Likewise.

Changed in gcc-linaro:
assignee: nobody → Yao Qi (yao-codesourcery)
Changed in gcc-linaro:
status: New → Fix Committed
Michael Hope (michaelh1)
Changed in gcc-linaro:
milestone: none → 4.4-2010.08-0
Michael Hope (michaelh1)
Changed in gcc-linaro:
importance: Undecided → Low
Michael Hope (michaelh1)
Changed in gcc-linaro:
status: Fix Committed → Fix Released
Revision history for this message
Michael Hope (michaelh1) wrote :
Revision history for this message
Andrew Stubbs (ams-codesourcery) wrote :
Changed in gcc-linaro-tracking:
assignee: nobody → Yao Qi (yao-codesourcery)
milestone: none → 4.6.0
Revision history for this message
Andrew Stubbs (ams-codesourcery) wrote :
Revision history for this message
Yao Qi (yao-codesourcery) wrote :

My patch for "arm target triplet" fix was committed to gcc,
http://gcc.gnu.org/ml/gcc-patches/2010-08/msg00665.html

However, this patch for this bug can't be upstreamable, because gcc.c-torture/execute/990208-1.x is in linaro tree only. What can we do here?

Revision history for this message
Yao Qi (yao-codesourcery) wrote :

After talked with Andrew, we agree to mark it as "Fix Committed", because it is not upstreamable.

Changed in gcc-linaro-tracking:
status: New → Fix Committed
Revision history for this message
Andrew Stubbs (ams-codesourcery) wrote :

Just to be clear, it is 'Fix Committed', not 'Won't Fix', because the rest of the patch has been committed. The remaining part is not so much non-upstreamable, as not-required in later versions of gcc.

Changed in gcc-linaro-tracking:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.