From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2BF8E385840C; Fri, 28 Jan 2022 15:52:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2BF8E385840C From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/104228] [9/10/11/12 Regression] ICE in df_install_ref, at df-scan.cc:2294 since r8-3589-g707905d0773e5a8e Date: Fri, 28 Jan 2022 15:52:26 +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: 12.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.5 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-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2022 15:52:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104228 --- Comment #4 from Jakub Jelinek --- The .y var is added into the s function with: #0 add_decl_as_local (decl=3D) at ../../gcc/fortran/trans-decl.cc:257 #1 0x0000000000c054f8 in gfc_finish_var_decl (decl=3D, sym=3D0x3e16a00) at ../../gcc/fortran/trans-decl.cc:649 #2 0x0000000000c09e9e in gfc_get_symbol_decl (sym=3D0x3e16a00) at ../../gcc/fortran/trans-decl.cc:1882 #3 0x0000000000c18dee in generate_local_decl (sym=3D0x3e16a00) at ../../gcc/fortran/trans-decl.cc:5853 #4 0x0000000000bb5174 in do_traverse_symtree (st=3D0x3e16b60, st_func=3D0x= 0, sym_func=3D0xc18d2a ) at ../../gcc/fortran/symbol.cc:4174 #5 0x0000000000bb522f in gfc_traverse_ns (ns=3D0x3e19810, sym_func=3D0xc18= d2a ) at ../../gcc/fortran/symbol.cc:4199 #6 0x0000000000c19780 in generate_local_vars (ns=3D0x3e19810) at ../../gcc/fortran/trans-decl.cc:6064 #7 0x0000000000c20fae in gfc_process_block_locals (ns=3D0x3e19810) at ../../gcc/fortran/trans-decl.cc:7940 #8 0x0000000000ca8b60 in gfc_trans_block_construct (code=3D0x3e16ba0) at ../../gcc/fortran/trans-stmt.cc:2296 #9 0x0000000000bd8645 in trans_code (code=3D0x3e16ba0, cond=3D) = at ../../gcc/fortran/trans.cc:2012 #10 0x0000000000bd8a58 in gfc_trans_code (code=3D0x3e16ba0) at ../../gcc/fortran/trans.cc:2268 #11 0x0000000000c203ea in gfc_generate_function_code (ns=3D0x3e15530) at ../../gcc/fortran/trans-decl.cc:7654 #12 0x0000000000c18b5d in gfc_generate_contained_functions (parent=3D0x3e14= 530) at ../../gcc/fortran/trans-decl.cc:5777 #13 0x0000000000c20031 in gfc_generate_function_code (ns=3D0x3e14530) at ../../gcc/fortran/trans-decl.cc:7586 #14 0x0000000000bd8a9c in gfc_generate_code (ns=3D0x3e14530) at ../../gcc/fortran/trans.cc:2285 #15 0x0000000000b5ca50 in translate_all_program_units (gfc_global_ns_list=3D0x3e14530) at ../../gcc/fortran/parse.cc:6651 #16 0x0000000000b5d299 in gfc_parse_file () at ../../gcc/fortran/parse.cc:6= 938 #17 0x0000000000bc0539 in gfc_be_parse_file () at ../../gcc/fortran/f95-lang.cc:216 #18 0x0000000001463e4f in compile_file () at ../../gcc/toplev.cc:452 #19 0x0000000001466e45 in do_compile (no_backend=3Dfalse) at ../../gcc/toplev.cc:2158 #20 0x000000000146720a in toplev::main (this=3D0x7fffffffd76a, argc=3D4, argv=3D0x7fffffffd878) at ../../gcc/toplev.cc:2310 #21 0x0000000002b3c444 in main (argc=3D4, argv=3D0x7fffffffd878) at ../../gcc/main.cc:39 and then pushdecl is called on it too: #0 pushdecl (decl=3D) at ../../gcc/fortran/f95-lang.cc:442 #1 0x0000000000c21086 in gfc_process_block_locals (ns=3D0x3e19810) at ../../gcc/fortran/trans-decl.cc:7952 #2 0x0000000000ca8b60 in gfc_trans_block_construct (code=3D0x3e16ba0) at ../../gcc/fortran/trans-stmt.cc:2296 #3 0x0000000000bd8645 in trans_code (code=3D0x3e16ba0, cond=3D) = at ../../gcc/fortran/trans.cc:2012 #4 0x0000000000bd8a58 in gfc_trans_code (code=3D0x3e16ba0) at ../../gcc/fortran/trans.cc:2268 #5 0x0000000000c203ea in gfc_generate_function_code (ns=3D0x3e15530) at ../../gcc/fortran/trans-decl.cc:7654 #6 0x0000000000c18b5d in gfc_generate_contained_functions (parent=3D0x3e14= 530) at ../../gcc/fortran/trans-decl.cc:5777 #7 0x0000000000c20031 in gfc_generate_function_code (ns=3D0x3e14530) at ../../gcc/fortran/trans-decl.cc:7586 #8 0x0000000000bd8a9c in gfc_generate_code (ns=3D0x3e14530) at ../../gcc/fortran/trans.cc:2285 #9 0x0000000000b5ca50 in translate_all_program_units (gfc_global_ns_list=3D0x3e14530) at ../../gcc/fortran/parse.cc:6651 #10 0x0000000000b5d299 in gfc_parse_file () at ../../gcc/fortran/parse.cc:6= 938 #11 0x0000000000bc0539 in gfc_be_parse_file () at ../../gcc/fortran/f95-lang.cc:216 #12 0x0000000001463e4f in compile_file () at ../../gcc/toplev.cc:452 #13 0x0000000001466e45 in do_compile (no_backend=3Dfalse) at ../../gcc/toplev.cc:2158 #14 0x000000000146720a in toplev::main (this=3D0x7fffffffd76a, argc=3D4, argv=3D0x7fffffffd878) at ../../gcc/toplev.cc:2310 #15 0x0000000002b3c444 in main (argc=3D4, argv=3D0x7fffffffd878) at ../../gcc/main.cc:39 with cfun->decl of s and once again in: #0 pushdecl (decl=3D) at ../../gcc/fortran/f95-lang.cc:442 #1 0x0000000000c20b7e in gfc_generate_function_code (ns=3D0x3e14530) at ../../gcc/fortran/trans-decl.cc:7768 #2 0x0000000000bd8a9c in gfc_generate_code (ns=3D0x3e14530) at ../../gcc/fortran/trans.cc:2285 #3 0x0000000000b5ca50 in translate_all_program_units (gfc_global_ns_list=3D0x3e14530) at ../../gcc/fortran/parse.cc:6651 #4 0x0000000000b5d299 in gfc_parse_file () at ../../gcc/fortran/parse.cc:6= 938 #5 0x0000000000bc0539 in gfc_be_parse_file () at ../../gcc/fortran/f95-lang.cc:216 #6 0x0000000001463e4f in compile_file () at ../../gcc/toplev.cc:452 #7 0x0000000001466e45 in do_compile (no_backend=3Dfalse) at ../../gcc/toplev.cc:2158 #8 0x000000000146720a in toplev::main (this=3D0x7fffffffd76a, argc=3D4, argv=3D0x7fffffffd878) at ../../gcc/toplev.cc:2310 #9 0x0000000002b3c444 in main (argc=3D4, argv=3D0x7fffffffd878) at ../../gcc/main.cc:39 with cfun->decl of p.=