From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16263 invoked by alias); 5 Mar 2014 16:08:13 -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 16237 invoked by uid 48); 5 Mar 2014 16:08:09 -0000 From: "florent.hivert at lri dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60430] New: static_assert and reference to const/constexpr Date: Wed, 05 Mar 2014 16:08: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: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: florent.hivert at lri dot fr 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 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg00368.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60430 Bug ID: 60430 Summary: static_assert and reference to const/constexpr Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: florent.hivert at lri dot fr I think the following should be accepted: constexpr const int A =3D 42; const int &B =3D A; static_assert(&A =3D=3D &B, "Bug"); int main() {return 0;} Indeed, even if B is not constexpr its address is. On the contrary GCC complains with bug2.cpp:3:1: error: non-constant condition for static assertion static_assert(&A =3D=3D &B, "Bug"); ^ bug2.cpp:3:1: error: the value of =E2=80=98B=E2=80=99 is not usable in a co= nstant expression bug2.cpp:2:12: note: =E2=80=98B=E2=80=99 was not declared =E2=80=98constexp= r=E2=80=99 const int &B =3D A; >>From gcc-bugs-return-445500-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Mar 05 16:12:40 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 19231 invoked by alias); 5 Mar 2014 16:12:40 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 19176 invoked by uid 48); 5 Mar 2014 16:12:37 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/60381] [4.9 Regression] ICE: in vt_expand_var_loc_chain, at var-tracking.c:8245 Date: Wed, 05 Mar 2014 16:12:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: aoliva at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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-03/txt/msg00369.txt.bz2 Content-length: 297 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60381 --- Comment #7 from Jakub Jelinek --- I admit I haven't timed the insn-recog.c compilation time with my patch, but I haven't noticed that the compile time would increase significantly. I guess I can benchmark it now.