Patchwork C++ PATCH for c++/53650 (memory-hog with large array)

login
register
mail settings
Submitter Jason Merrill
Date Jan. 3, 2013, 6:39 p.m.
Message ID <50E5D053.9080901@redhat.com>
Download mbox | patch
Permalink /patch/209298/
State New
Headers show

Comments

Jason Merrill - Jan. 3, 2013, 6:39 p.m.
On 01/03/2013 11:54 AM, Jakub Jelinek wrote:
> I'd say safer would be to scan the gimple dump instead...

That makes sense.

Patch

commit 8a13c5cee23447467ed58bb1f213cad9050e3f87
Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Jan 3 18:34:48 2013 +0000

    	PR c++/53650
    	* g++.dg/init/array34.C: Check gimple dump, not assembler.
    
diff --git a/gcc/testsuite/g++.dg/init/array34.C b/gcc/testsuite/g++.dg/init/array34.C
index c5f608b..1c2e022 100644
--- a/gcc/testsuite/g++.dg/init/array34.C
+++ b/gcc/testsuite/g++.dg/init/array34.C
@@ -1,7 +1,9 @@ 
 // PR c++/53650
 // We should loop over array inits if they don't involve temporaries
 // that need extending.
-// { dg-final { scan-assembler-times "_ZN5ClassC1Ev" 1 } }
+// { dg-options "-fdump-tree-gimple" }
+// { dg-final { scan-tree-dump-times "Class::Class" 1 "gimple" } }
+// { dg-final { cleanup-tree-dump "gimple" } }
 
 struct Class {
   Class();