This testcase (from bug 15678) shows quadratic time in cgraph_reset_static_var_maps:

#define F0(a) void a(){}
#define F1(a) F0(a##0) F0(a##1) F0(a##2) F0(a##3) F0(a##4) F0(a##5) F0(a##6)
#define F2(a) F1(a##0) F1(a##1) F1(a##2) F1(a##3) F1(a##4) F1(a##5) F1(a##6)
#define F3(a) F2(a##0) F2(a##1) F2(a##2) F2(a##3) F2(a##4) F2(a##5) F2(a##6)
#define F4(a) F3(a##0) F3(a##1) F3(a##2) F3(a##3) F3(a##4) F3(a##5) F3(a##6)
#define F5(a) F4(a##0)/*F4(a##1) F4(a##2) F3(a##3) F3(a##4) F3(a##5) F3(a##6)*/

F5(f)

-- 
           Summary: [4.0 Regression] O(N^2) in cgraph_reset_static_var_maps
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at lubercy dot com
                CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 15678
             nThis:


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17707

Reply via email to