Patchwork Fix FAIL: g++.dg/debug/ra1.C on arm

login
register
mail settings
Submitter Kyrylo Tkachov
Date Sept. 16, 2013, 10:08 a.m.
Message ID <5236D8B6.9050203@arm.com>
Download mbox | patch
Permalink /patch/275178/
State New
Headers show

Comments

Kyrylo Tkachov - Sept. 16, 2013, 10:08 a.m.
Hi all,

The test g++.dg/debug/ra1.C now gives an extra warning on arm:
"warning: width of 'tree_base::code' exceeds its type [enabled by default]"
which causes the test to "fail".

This patch adds -fno-short-enums to it to fix the warning for targets 
with short enums (including arm)

Tested to make sure it now passes on arm-none-eabi.

Ok for trunk?

(CC'ing Richard because he added the test)

[gcc/testsuite/]
2013-09-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * g++.dg/debug/ra1.C: Add -fno-short-enums for short_enum targets.

Patch

diff --git a/gcc/testsuite/g++.dg/debug/ra1.C b/gcc/testsuite/g++.dg/debug/ra1.C
index b6f7bfc..aae7311 100644
--- a/gcc/testsuite/g++.dg/debug/ra1.C
+++ b/gcc/testsuite/g++.dg/debug/ra1.C
@@ -1,4 +1,5 @@ 
 /* { dg-options "-fcompare-debug" } */
+/* { dg-additional-options "-fno-short-enums" { target { short_enums } } } */
 
 enum signop { SIGNED, UNSIGNED };
 enum tree_code { FOO, BAR };