From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121207 invoked by alias); 25 Jul 2015 15:13:00 -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 120950 invoked by uid 48); 25 Jul 2015 15:12:56 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/64921] [4.9/5/6 Regression] FAIL: gfortran.dg/class_allocate_18.f90 Date: Sat, 25 Jul 2015 15:13: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.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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-07/txt/msg02214.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64921 Uro=C5=A1 Bizjak changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenther at suse dot de --- Comment #18 from Uro=C5=A1 Bizjak --- (In reply to Uro=C5=A1 Bizjak from comment #17) > (In reply to Mat Cross from comment #14) > > For the record, perhaps it is of interest for me to note that we are ru= nning > > into this (cf. PR64230 comment 9) on code like > >=20 > > Program test > > Implicit None > > Type :: t1 > > Integer, Allocatable :: i > > End Type > > Type :: t2 > > Integer, Allocatable :: i > > End Type > > Type, Extends (t1) :: t3 > > Type (t2) :: j > > End Type > > Type, Extends (t3) :: t4 > > Integer, Allocatable :: k > > End Type > > Call s > > Print *, 'ok' > > Contains > > Subroutine s > > Class (t1), Allocatable :: x > > Allocate (t4 :: x) > > End Subroutine > > End Program > >=20 > > Since the crash is in bad compiler-generated finalization code (since 4= .9), > > and given that (if I recall correctly) gfortran is using the Fortran 20= 08 > > semantics for entities declared in a main program being implicitly save= d, > > this is why removing the Deallocate (in the comment 12 example) works -= the > > finalizer is never called then. >=20 > No wonder this test crashes. Tree-optimizers (-O2) on x86_64 produce: [...] I was able to trace dumps down to _.fre2 tree dump, where we have: : # idx_104 =3D PHI <0(11), idx_122(16)> offset_115 =3D 0; ptr2_119 =3D (struct t3 *) offset_115; _120 =3D &ptr2_119->j; This can't be right, we have a dereference from zero. If the frontend produ= ced correct code, then tree-optimization passes made a mess here. CC Richi. >>From gcc-bugs-return-493325-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jul 25 16:37:08 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 84813 invoked by alias); 25 Jul 2015 16:37:07 -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 84750 invoked by uid 48); 25 Jul 2015 16:37:01 -0000 From: "Casey at Carter dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/67007] New: [c++-concepts] Deduction constraint Date: Sat, 25 Jul 2015 16:37: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: c++-concepts X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Casey at Carter dot net 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone 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: 2015-07/txt/msg02215.txt.bz2 Content-length: 2742 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67007 Bug ID: 67007 Summary: [c++-concepts] Deduction constraint Product: gcc Version: c++-concepts Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: Casey at Carter dot net Target Milestone: --- r226205 ICEs compiling this program: template concept bool A = requires (U u) { u; }; template concept bool B = requires (T t) { { t } -> A; }; void foo(B); apparently while normalizing the constraints of B: ~/concept-gcc/bin/g++ -std=c++1z foo.cpp -c foo.cpp:9:11: internal compiler error: in tsubst_constraint, at cp/constraint.cc:1511 void foo(B); ^ 0x8032b1 tsubst_constraint(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/constraint.cc:1511 0x65794f tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/pt.c:12798 0x806bf0 tsubst_compound_requirement ../../gcc/cp/constraint.cc:1604 0x806bf0 tsubst_requirement ../../gcc/cp/constraint.cc:1632 0x806bf0 tsubst_requirement_body ../../gcc/cp/constraint.cc:1651 0x806bf0 tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/constraint.cc:1682 0x65103a tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/cp/pt.c:16429 0x64462e tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) ../../gcc/cp/pt.c:15092 0x80591f lift_variable_initializer ../../gcc/cp/constraint.cc:440 0x805220 normalize_predicate_constraint ../../gcc/cp/constraint.cc:955 0x805220 normalize_constraint ../../gcc/cp/constraint.cc:993 0x805508 build_constraints(tree_node*, tree_node*) ../../gcc/cp/constraint.cc:1096 0x5af175 grokfndecl ../../gcc/cp/decl.c:7788 0x6208f6 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) ../../gcc/cp/decl.c:11202 0x621126 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int, tree_node*, tree_node*, tree_node**) ../../gcc/cp/decl.c:4744 0x710580 cp_parser_init_declarator ../../gcc/cp/parser.c:17728 0x71336d cp_parser_simple_declaration ../../gcc/cp/parser.c:11685 0x70c8f4 cp_parser_block_declaration ../../gcc/cp/parser.c:11559 0x718783 cp_parser_declaration ../../gcc/cp/parser.c:11456 0x716f5a cp_parser_declaration_seq_opt ../../gcc/cp/parser.c:11338 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.