From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12746 invoked by alias); 22 Feb 2014 05:53:56 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 12730 invoked by uid 48); 22 Feb 2014 05:53:53 -0000 From: "garcia.espinosa.jr at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60315] New: template constructor switch optimization Date: Sat, 22 Feb 2014 05:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: garcia.espinosa.jr at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg02354.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60315 Bug ID: 60315 Summary: template constructor switch optimization Product: gcc Version: unknown Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: garcia.espinosa.jr at gmail dot com Created attachment 32198 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32198&action=edit code to trigger the error when compiled with "gcc -O1 test.cpp" g++ 4.8 huge (infinite?) compiling time when optimization is requested (any -Ox) Code works well with previous versions (4.6, 4.7), or if no optimization is requested. Also, if the number of switch cases is reduced to 3 (eg comment out the case E4 line), no noticeable compiling time Tested: GCC 4.8.1, Linux x86_64 (ubuntu 12.04 and others)