diff mbox

[testsuite] remove XFAIL for all but ia64 for g++.dg/tree-ssa/pr43411.C

Message ID 4DDED062.6070802@codesourcery.com
State New
Headers show

Commit Message

Janis Johnson May 26, 2011, 10:12 p.m. UTC
On 05/25/2011 05:15 AM, Jan Hubicka wrote:
> Am Wed 25 May 2011 11:04:06 AM CEST schrieb Richard Guenther  
> <richard.guenther@gmail.com>:
> 
>> On Wed, May 25, 2011 at 10:38 AM, Rainer Orth
>> <ro@cebitec.uni-bielefeld.de> wrote:
>>> Janis Johnson <janisjo@codesourcery.com> writes:
>>>
>>>> Archived test results for 4.7.0 for most processors with C++ results have:
>>>>
>>>> XPASS: g++.dg/tree-ssa/pr43411.C scan-tree-dump-not optimized   
>>>> "OBJ_TYPE_REF"
>>>>
>>>> The only failures I could find were for ia64-linux and ia64-hpux.  This
>>>> patch changes the xfail so it only applies to ia64-*-*.  OK for trunk?
>>>
>>> Richard rejected a similar patch:
>>>
>>>        http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00054.html
>>>
>>> Perhaps Jan can suggest the correct approach?
>>
>> We should verify that the call to val is inlined in all functions.
>> Maybe rename it to something larger and scan the optimized
>> dump so that name doesn't appear.
> Indeed, this seems to be safest approach I can think of.
> If function is supposed to be optimized out completely by early  
> passes, we should just search release_ssa.  It is not the case here  
> and dumping IPA info for inlining all instance would be bit tricky.

This patch renames val to function_to_inline and searches for its
name in the release-ssa dump.  That scan-dump has an xfail. The
original scan-dump of 'optimized' is removed.

Richard and Jan, is this OK?
2011-05-26  Janis Johnson  <janisjo@codesourcery.com>

	* g++.dg/tree-ssa-pr43411.C: Rename function to be inlined and
	replace dump search.

Comments

Richard Biener May 27, 2011, 7:35 a.m. UTC | #1
On Fri, May 27, 2011 at 12:12 AM, Janis Johnson
<janisjo@codesourcery.com> wrote:
> On 05/25/2011 05:15 AM, Jan Hubicka wrote:
>> Am Wed 25 May 2011 11:04:06 AM CEST schrieb Richard Guenther
>> <richard.guenther@gmail.com>:
>>
>>> On Wed, May 25, 2011 at 10:38 AM, Rainer Orth
>>> <ro@cebitec.uni-bielefeld.de> wrote:
>>>> Janis Johnson <janisjo@codesourcery.com> writes:
>>>>
>>>>> Archived test results for 4.7.0 for most processors with C++ results have:
>>>>>
>>>>> XPASS: g++.dg/tree-ssa/pr43411.C scan-tree-dump-not optimized
>>>>> "OBJ_TYPE_REF"
>>>>>
>>>>> The only failures I could find were for ia64-linux and ia64-hpux.  This
>>>>> patch changes the xfail so it only applies to ia64-*-*.  OK for trunk?
>>>>
>>>> Richard rejected a similar patch:
>>>>
>>>>        http://gcc.gnu.org/ml/gcc-patches/2011-05/msg00054.html
>>>>
>>>> Perhaps Jan can suggest the correct approach?
>>>
>>> We should verify that the call to val is inlined in all functions.
>>> Maybe rename it to something larger and scan the optimized
>>> dump so that name doesn't appear.
>> Indeed, this seems to be safest approach I can think of.
>> If function is supposed to be optimized out completely by early
>> passes, we should just search release_ssa.  It is not the case here
>> and dumping IPA info for inlining all instance would be bit tricky.
>
> This patch renames val to function_to_inline and searches for its
> name in the release-ssa dump.  That scan-dump has an xfail. The
> original scan-dump of 'optimized' is removed.
>
> Richard and Jan, is this OK?

Ok.

Thanks,
Richard.

>
diff mbox

Patch

Index: g++.dg/tree-ssa/pr43411.C
===================================================================
--- g++.dg/tree-ssa/pr43411.C	(revision 174217)
+++ g++.dg/tree-ssa/pr43411.C	(working copy)
@@ -1,6 +1,6 @@ 
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
-class P { public: virtual int val() { return 123; } };
+/* { dg-options "-O2 -fdump-tree-release_ssa" } */
+class P { public: virtual int function_to_inline() { return 123; } };
 class Psub : public P { };
 
 extern int sink1, sink2;
@@ -8,12 +8,12 @@ 
 void test() {
     Psub p;
     P &pRef = p;
-    sink1 = p.val();
-    sink2 = pRef.val();
+    sink1 = p.function_to_inline();
+    sink2 = pRef.function_to_inline();
 }
 
 
-inline int v(P &p) { return p.val(); }
+inline int v(P &p) { return p.function_to_inline(); }
 
 void testInlineP() {
     P p;
@@ -25,5 +25,5 @@ 
     sink1 = v(p);
 }
 
-// { dg-final { scan-tree-dump-not "OBJ_TYPE_REF" "optimized" { xfail *-*-* } } }
-// { dg-final { cleanup-tree-dump "optimized" } }
+// { dg-final { scan-tree-dump-not "function_to_inline" "release_ssa" { xfail *-*-* } } }
+// { dg-final { cleanup-tree-dump "release_ssa" } }