From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121427 invoked by alias); 15 Jun 2015 19:03:23 -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 121285 invoked by uid 48); 15 Jun 2015 19:03:17 -0000 From: "gerhard.steinmetz.fortran@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/66545] ICE on using undefined parameter/variable values Date: Mon, 15 Jun 2015 19:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 5.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gerhard.steinmetz.fortran@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: Message-ID: In-Reply-To: References: 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: 2015-06/txt/msg01362.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D66545 --- Comment #2 from Gerhard Steinmetz --- FYI, it's astonishing, but this code compiles without an ICE and prints some reasonable error messages : $ cat z2_type.f90 program p type t integer :: n end type type(t), parameter :: c1 =3D (t(c1%n)) type(t), parameter :: c2 =3D t(c2%n) type(t) :: c3 =3D (t(c3%n)) type(t) :: c4 =3D t(c4%n) type(t) :: c5 type(t) :: c6 c5 =3D (t(c5%n)) c6 =3D t(c6%n) end $ gfortran -c z2_type.f90 z2_type.f90:5:33: type(t), parameter :: c1 =3D (t(c1%n)) 1 Error: PARAMETER =E2=80=98c1=E2=80=99 is used at (1) before its definition = is complete z2_type.f90:6:32: type(t), parameter :: c2 =3D t(c2%n) 1 Error: PARAMETER =E2=80=98c2=E2=80=99 is used at (1) before its definition = is complete z2_type.f90:7:22: type(t) :: c3 =3D (t(c3%n)) 1 Error: Parameter =E2=80=98c3=E2=80=99 at (1) has not been declared or is a = variable, which does not reduce to a constant expression z2_type.f90:8:21: type(t) :: c4 =3D t(c4%n) 1 Error: Parameter =E2=80=98c4=E2=80=99 at (1) has not been declared or is a = variable, which does not reduce to a constant Expression # # c5, c6 differs # >>From gcc-bugs-return-489032-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Jun 15 19:27:56 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 130671 invoked by alias); 15 Jun 2015 19:27:55 -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 130629 invoked by uid 48); 15 Jun 2015 19:27:51 -0000 From: "paolo.carlini at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/51048] Class template inheritance doesn't work well with function-local types Date: Mon, 15 Jun 2015 19:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.7.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: paolo.carlini at oracle dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution assigned_to target_milestone 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: 2015-06/txt/msg01364.txt.bz2 Content-length: 575 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51048 Paolo Carlini changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Assignee|paolo.carlini at oracle dot com |unassigned at gcc dot gnu.org Target Milestone|--- |6.0 --- Comment #8 from Paolo Carlini --- Fixed.