From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15191 invoked by alias); 24 Oct 2011 23:31:18 -0000 Received: (qmail 15183 invoked by uid 22791); 24 Oct 2011 23:31:17 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KAM_BADIPHTTP,NORMAL_HTTP_TO_IP X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 24 Oct 2011 23:30:52 +0000 From: "bitbucket at mailinator dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50859] New: ICE when creating integral constant from real value in a template Date: Mon, 24 Oct 2011 23:31: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-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: bitbucket at mailinator 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-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 X-SW-Source: 2011-10/txt/msg02509.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D50859 Bug #: 50859 Summary: ICE when creating integral constant from real value in a template Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: bitbucket@mailinator.com $ curl 'http://169.254.169.254/latest/meta-data/ami-id' && echo ami-21f53948 $ cat /etc/issue Ubuntu 11.10 \n \l $ uname -a Linux domU-12-31-39-12-AC-DE 3.0.0-12-virtual #20-Ubuntu SMP Fri Oct 7 18:1= 9:02 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux $ g++ --version g++ (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ cat ice.cc=20 template void f() { const int INTEGRAL_CONSTANT =3D 1.0; } $ g++ ice.cc ice.cc: In function =E2=80=98void f()=E2=80=99: ice.cc:3:33: internal compiler error: in fold_convert_const_int_from_real, = at fold-const.c:1562 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Preprocessed source stored into /tmp/ccRBRVx3.out file, please attach this = to your bugreport. $ cat /tmp/ccRBRVx3.out // /usr/lib/gcc/x86_64-linux-gnu/4.6.1/cc1plus -quiet -imultilib . -imultia= rch x86_64-linux-gnu -D_GNU_SOURCE ice.cc -quiet -dumpbase ice.cc -mtune=3Dgene= ric -march=3Dx86-64 -auxbase ice -fstack-protector -o - -frandom-seed=3D0 # 1 "ice.cc" # 1 "" # 1 "" # 1 "ice.cc" template void f() { const int INTEGRAL_CONSTANT =3D 1.0; } $ This error does not appear in g++ 4.4.1