From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6678639A3037; Wed, 17 Jun 2020 20:34:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6678639A3037 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592426066; bh=+yiGtrDxWpq+nY3AmXwbgb//tsYcSHXqi8uLmKnQmKQ=; h=From:To:Subject:Date:From; b=K7Z8yqREasYWW8JStgd+xO0wvOkFmFicRQU4RF586/ER0Jjjned27i+2lCCl2O6JM uK3AimdYrzVQR19P8uctiqcesC9kroZ8+7zduWZPtj3bEQeJLS/nl9F6ncbqcjbAoE HTJuEMmqpPKc+MVYyO+efzQMq8W+SfJPytcjvBC0= From: "tschwinge at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/95730] New: GCN offloading ICEs after commit fe7ebef7fe4f9acb79658ed9db0749b07efc3105 "Add support for __builtin_bswap128" Date: Wed, 17 Jun 2020 20:34:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: openacc, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: tschwinge at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ams at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone cf_gcctarget 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-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: Wed, 17 Jun 2020 20:34:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95730 Bug ID: 95730 Summary: GCN offloading ICEs after commit fe7ebef7fe4f9acb79658ed9db0749b07efc3105 "Add support for __builtin_bswap128" Product: gcc Version: 11.0 Status: UNCONFIRMED Keywords: openacc, openmp Severity: normal Priority: P3 Component: target Assignee: ams at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: ebotcazou at gcc dot gnu.org, jules at gcc dot gnu.org Target Milestone: --- Target: gcn For a few libgomp test cases, the recent commit fe7ebef7fe4f9acb79658ed9db0749b07efc3105 "Add support for __builtin_bswap12= 8" is causing ICE regressions with GCN offloading (only, apparently: not seen = for Intel MIC (emulated), or nvptx offloading): 'libgomp.fortran/pr90779.f90': lto1: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in lto_input_tree_1, at lto-streamer-in.c:1561 #0 internal_error (gmsgid=3D0x163f958 "tree check: expected class %qs,= have %qs (%s) in %s, at %s:%d") at [...]/source-gcc/gcc/diagnostic.c:1706 #1 0x000000000055f2fd in tree_class_check_failed (node=3D0x7ffff67b496= 0, cl=3D, file=3D, line=3D, function=3D) at [...]/source-gcc/gcc/tree.c:9738 #2 0x00000000009d7886 in tree_class_check (__g=3D, __l= =3D1561, __f=3D0x15d1208 "[...]/source-gcc/gcc/lto-streamer-in.c", __class=3Dtcc_typ= e, __t=3D0x7ffff67b4960) at [...]/source-gcc/gcc/tree.h:3424 #3 lto_input_tree_1 (ib=3D0x7fffffffd080, data_in=3D0x1dd4860, tag=3D<= optimized out>, hash=3D) at [...]/source-gcc/gcc/lto-streamer-in.c:1561 #4 0x00000000005d84b6 in lto_read_decls (resolutions=3D..., data=3D0x1= e3a630, decl_data=3D0x7ffff7fee090) at [...]/source-gcc/gcc/lto/lto-common.c:1955 #5 lto_file_finalize (file=3D0x1d8c900, order=3D0, file_data=3D0x7ffff= 7fee090) at [...]/source-gcc/gcc/lto/lto-common.c:2267 #6 lto_create_files_from_ids (order=3D0, count=3D, file_data=3D0x7ffff7fee090, file=3D0x1d8c900) at [...]/source-gcc/gcc/lto/lto-common.c:2277 #7 lto_file_read (count=3D, resolution_file=3D, file=3D) at [...]/source-gcc/gcc/lto/lto-common.c:2332 #8 read_cgraph_and_symbols (nfiles=3D, fnames=3D) at [...]/source-gcc/gcc/lto/lto-common.c:2784 #9 0x00000000005b9c23 in lto_main () at [...]/source-gcc/gcc/lto/lto.c= :625 #10 0x0000000000b7f6ff in compile_file () at [...]/source-gcc/gcc/toplev.c:458 #11 0x000000000059302c in do_compile () at [...]/source-gcc/gcc/toplev.c:2307 #12 toplev::main (this=3Dthis@entry=3D0x7fffffffd240, argc=3Dargc@entry= =3D19, argv=3D0x1d766e0, argv@entry=3D0x7fffffffd348) at [...]/source-gcc/gcc/toplev.c:2446 #13 0x0000000000595ac7 in main (argc=3D19, argv=3D0x7fffffffd348) at [...]/source-gcc/gcc/main.c:39 (gdb) frame 3 #3 lto_input_tree_1 (ib=3D0x7fffffffd080, data_in=3D0x1dd4860, tag=3D<= optimized out>, hash=3D) at [...]/source-gcc/gcc/lto-streamer-in.c:1561 1561 gcc_assert (TYPE_PRECISION (type) <=3D MAX_BITSIZE_MODE_ANY_INT); (gdb) print type $1 =3D (tree) 0x7ffff67b4960 (gdb) call debug_tree(type) 'libgomp.oacc-c-c++-common/firstprivate-mappings-1.c': lto1: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in lto_fixup_prevailing_type, at lto/lto-common.c:993 #0 internal_error (gmsgid=3D0x163f958 "tree check: expected class %qs,= have %qs (%s) in %s, at %s:%d") at [...]/source-gcc/gcc/diagnostic.c:1706 #1 0x000000000055f2fd in tree_class_check_failed (node=3D0x7ffff67b496= 0, cl=3D, file=3D, line=3D, function=3D) at [...]/source-gcc/gcc/tree.c:9738 #2 0x00000000005d7724 in tree_class_check (__g=3D, __l= =3D993, __f=3D0x1559cc8 "[...]/source-gcc/gcc/lto/lto-common.c", __class=3Dtcc_type, __t=3D) at [...]/source-gcc/gcc/tree.h:3424 #3 lto_fixup_prevailing_type (t=3D0x7ffff6883b28) at [...]/source-gcc/gcc/lto/lto-common.c:993 #4 process_new_tree (t=3Dt@entry=3D0x7ffff6883b28, hm=3Dhm@entry=3D0x7= fffffffd0b0, index=3Dindex@entry=3D467, total=3Dtotal@entry=3D0x7fffffffd048, data_in=3Ddata_in@entry=3D0x1e37560) at [...]/source-gcc/gcc/lto/lto-common= .c:1817 #5 0x00000000005d8e24 in lto_read_decls (resolutions=3D..., data=3D0x1= e44f50, decl_data=3D0x7ffff7fee090) at [...]/source-gcc/gcc/lto/lto-common.c:1938 #6 lto_file_finalize (file=3D0x1d8bc30, order=3D0, file_data=3D0x7ffff= 7fee090) at [...]/source-gcc/gcc/lto/lto-common.c:2267 #7 lto_create_files_from_ids (order=3D0, count=3D, file_data=3D0x7ffff7fee090, file=3D0x1d8bc30) at [...]/source-gcc/gcc/lto/lto-common.c:2277 #8 lto_file_read (count=3D, resolution_file=3D, file=3D) at [...]/source-gcc/gcc/lto/lto-common.c:2332 #9 read_cgraph_and_symbols (nfiles=3D, fnames=3D) at [...]/source-gcc/gcc/lto/lto-common.c:2784 #10 0x00000000005b9c23 in lto_main () at [...]/source-gcc/gcc/lto/lto.c= :625 #11 0x0000000000b7f6ff in compile_file () at [...]/source-gcc/gcc/toplev.c:458 #12 0x000000000059302c in do_compile () at [...]/source-gcc/gcc/toplev.c:2307 #13 toplev::main (this=3Dthis@entry=3D0x7fffffffd250, argc=3Dargc@entry= =3D18, argv=3D0x1d76a30, argv@entry=3D0x7fffffffd358) at [...]/source-gcc/gcc/toplev.c:2446 #14 0x0000000000595ac7 in main (argc=3D18, argv=3D0x7fffffffd358) at [...]/source-gcc/gcc/main.c:39 (gdb) frame 3 #3 lto_fixup_prevailing_type (t=3D0x7ffff6883b28) at [...]/source-gcc/gcc/lto/lto-common.c:993 993 TYPE_NEXT_PTR_TO (t) =3D TYPE_POINTER_TO (TREE_TYPE (t)); (gdb) call debug_tree(t) unsigned DI size constant 64> unit-size constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 structural-equal= ity> 'libgomp.oacc-c++/firstprivate-mappings-1.C': lto1: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in lto_fixup_prevailing_type, at lto/lto-common.c:993 #0 internal_error (gmsgid=3D0x163f958 "tree check: expected class %qs,= have %qs (%s) in %s, at %s:%d") at [...]/source-gcc/gcc/diagnostic.c:1706 #1 0x000000000055f2fd in tree_class_check_failed (node=3D0x7ffff67b496= 0, cl=3D, file=3D, line=3D, function=3D) at [...]/source-gcc/gcc/tree.c:9738 #2 0x00000000005d7849 in tree_class_check (__g=3D, __l= =3D999, __f=3D0x1559cc8 "[...]/source-gcc/gcc/lto/lto-common.c", __class=3Dtcc_type, __t=3D) at [...]/source-gcc/gcc/tree.h:3424 #3 lto_fixup_prevailing_type (t=3D0x7ffff687fbd0) at [...]/source-gcc/gcc/lto/lto-common.c:999 #4 process_new_tree (t=3Dt@entry=3D0x7ffff687fbd0, hm=3Dhm@entry=3D0x7= fffffffd0b0, index=3Dindex@entry=3D293, total=3Dtotal@entry=3D0x7fffffffd048, data_in=3Ddata_in@entry=3D0x1e37560) at [...]/source-gcc/gcc/lto/lto-common= .c:1817 #5 0x00000000005d8e24 in lto_read_decls (resolutions=3D..., data=3D0x1= e44f50, decl_data=3D0x7ffff7fee090) at [...]/source-gcc/gcc/lto/lto-common.c:1938 #6 lto_file_finalize (file=3D0x1d8bc30, order=3D0, file_data=3D0x7ffff= 7fee090) at [...]/source-gcc/gcc/lto/lto-common.c:2267 #7 lto_create_files_from_ids (order=3D0, count=3D, file_data=3D0x7ffff7fee090, file=3D0x1d8bc30) at [...]/source-gcc/gcc/lto/lto-common.c:2277 #8 lto_file_read (count=3D, resolution_file=3D, file=3D) at [...]/source-gcc/gcc/lto/lto-common.c:2332 #9 read_cgraph_and_symbols (nfiles=3D, fnames=3D) at [...]/source-gcc/gcc/lto/lto-common.c:2784 #10 0x00000000005b9c23 in lto_main () at [...]/source-gcc/gcc/lto/lto.c= :625 #11 0x0000000000b7f6ff in compile_file () at [...]/source-gcc/gcc/toplev.c:458 #12 0x000000000059302c in do_compile () at [...]/source-gcc/gcc/toplev.c:2307 #13 toplev::main (this=3Dthis@entry=3D0x7fffffffd250, argc=3Dargc@entry= =3D18, argv=3D0x1d76a30, argv@entry=3D0x7fffffffd358) at [...]/source-gcc/gcc/toplev.c:2446 #14 0x0000000000595ac7 in main (argc=3D18, argv=3D0x7fffffffd358) at [...]/source-gcc/gcc/main.c:39 (gdb) frame 3 #3 lto_fixup_prevailing_type (t=3D0x7ffff687fbd0) at [...]/source-gcc/gcc/lto/lto-common.c:999 999 TYPE_NEXT_REF_TO (t) =3D TYPE_REFERENCE_TO (TREE_TYPE (t)= ); (gdb) call debug_tree(t) unsigned DI size constant 64> unit-size constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 structural-equal= ity> This is with '--enable-checking=3Dyes,extra,rtl'. I have not assessed whether there are other code paths that may fail in sim= ilar ways. Note that commit fe7ebef7fe4f9acb79658ed9db0749b07efc3105 "Add support for __builtin_bswap128" didn't actually touch the LTO streaming code. From a v= ery quick look, I cannot tell why/where gcn vs. nvptx back ends would be differ= ent in 128-bit data type handling, which I presume is where this stray 'error_m= ark' is coming from, indirectly. Testing current commit 1b76341441da344a0738edffdfab5d6307311ff2, I'm confir= ming that reverting commit fe7ebef7fe4f9acb79658ed9db0749b07efc3105 "Add support= for __builtin_bswap128", and as a pre-requisite commit 0bd4508f86889995f6864bf50773bd6859951007 "Fix bits/bytes confusion in latest change to expand_unop" gets us rid of the ICE regressions.=