public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104052] New: Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble
@ 2022-01-16 16:43 jakub at gcc dot gnu.org
2022-01-16 22:48 ` [Bug c++/104052] " pinskia at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-16 16:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104052
Bug ID: 104052
Summary: Modules ICE on powerpc64le-linux with
-mabi=ieeelongdouble
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jakub at gcc dot gnu.org
Target Milestone: ---
In gcc configured --with-long-double-format=ieee (but also just when running
make check-g++ RUNTESTFLAGS='--target_board=unix/-mabi=ieeelongdouble
modules.exp'
I'm seeing all the tests ICE like:
gcc/testsuite/g++.dg/modules/global-3_a.C:5:8: internal compiler error: in
type_node, at cp/module.cc:8721
0x10218fcb trees_out::type_node(tree_node*)
../../gcc/cp/module.cc:8721
0x10216f57 trees_out::tree_node(tree_node*)
../../gcc/cp/module.cc:9049
0x10218ecb trees_out::type_node(tree_node*)
../../gcc/cp/module.cc:8715
0x10216f57 trees_out::tree_node(tree_node*)
../../gcc/cp/module.cc:9049
0x10217b0f trees_out::core_vals(tree_node*)
../../gcc/cp/module.cc:6003
0x1021880f trees_out::tree_node_vals(tree_node*)
../../gcc/cp/module.cc:7062
0x1021894f trees_out::fn_parms_init(tree_node*)
../../gcc/cp/module.cc:9981
0x10215923 trees_out::decl_value(tree_node*, depset*)
../../gcc/cp/module.cc:7626
0x1024ab47 depset::hash::find_dependencies(module_state*)
../../gcc/cp/module.cc:13128
0x1024beef module_state::write(elf_out*, cpp_reader*)
../../gcc/cp/module.cc:17618
0x112c25cb finish_module_processing(cpp_reader*)
../../gcc/cp/module.cc:19874
0x10911f93 c_parse_final_cleanups()
../../gcc/cp/decl2.c:5311
0x11274c23 c_common_parse_file()
../../gcc/c-family/c-opts.c:1260
where the innermost type_node is called on
<real_type 0x7fffe82f0b28 __ibm128 type_6 IF
size <integer_cst 0x7fffe8131230 type <integer_type 0x7fffe82200a8
bitsizetype> constant 128>
unit-size <integer_cst 0x7fffe8131248 type <integer_type 0x7fffe8220000
sizetype> constant 16>
align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffe82f0b28 precision:128
pointer_to_this <pointer_type 0x7fffdb9680a0> reference_to_this
<reference_type 0x7fffddba1848>>
But I don't really see type_node called on other REAL_TYPEs, e.g. with
-mabi=ibmlongdouble
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104052] Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble
2022-01-16 16:43 [Bug c++/104052] New: Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble jakub at gcc dot gnu.org
@ 2022-01-16 22:48 ` pinskia at gcc dot gnu.org
2022-01-16 22:50 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-16 22:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104052
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu.org
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
ibm128_float_type_node = make_node (REAL_TYPE);
TYPE_PRECISION (ibm128_float_type_node) = 128;
SET_TYPE_MODE (ibm128_float_type_node, IFmode);
layout_type (ibm128_float_type_node);
long_double_type_node = make_node (REAL_TYPE);
TYPE_PRECISION (long_double_type_node) = LONG_DOUBLE_TYPE_SIZE;
layout_type (long_double_type_node);
I don't see any difference there either.
I don't see any reference to long_double_type_node in module.cc either. Nor
TYPE_MODE.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104052] Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble
2022-01-16 16:43 [Bug c++/104052] New: Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble jakub at gcc dot gnu.org
2022-01-16 22:48 ` [Bug c++/104052] " pinskia at gcc dot gnu.org
@ 2022-01-16 22:50 ` jakub at gcc dot gnu.org
2022-01-16 22:54 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-16 22:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104052
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I bet we don't reach this because modules.cc has:
/* Global trees. */
static const std::pair<tree *, unsigned> global_tree_arys[] =
{
std::pair<tree *, unsigned> (sizetype_tab, stk_type_kind_last),
std::pair<tree *, unsigned> (integer_types, itk_none),
std::pair<tree *, unsigned> (global_trees, TI_MODULE_HWM),
std::pair<tree *, unsigned> (c_global_trees, CTI_MODULE_HWM),
std::pair<tree *, unsigned> (cp_global_trees, CPTI_MODULE_HWM),
std::pair<tree *, unsigned> (NULL, 0)
};
and special cases those somehow. So e.g. long_double_type_node and others
#define float_type_node global_trees[TI_FLOAT_TYPE]
#define double_type_node global_trees[TI_DOUBLE_TYPE]
#define long_double_type_node global_trees[TI_LONG_DOUBLE_TYPE]
or
#define float128_type_node global_trees[TI_FLOAT128_TYPE]
all go through that. But modules.cc doesn't know about types the backend
creates
like __ibm128. __int24 etc. is probably ok due to integer_types
containing
itk_intN_0,
itk_unsigned_intN_0,
itk_intN_1,
itk_unsigned_intN_1,
itk_intN_2,
itk_unsigned_intN_2,
itk_intN_3,
itk_unsigned_intN_3,
So, one way through this would be to reserve one or more global_trees for the
extra backend floating point types.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104052] Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble
2022-01-16 16:43 [Bug c++/104052] New: Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble jakub at gcc dot gnu.org
2022-01-16 22:48 ` [Bug c++/104052] " pinskia at gcc dot gnu.org
2022-01-16 22:50 ` jakub at gcc dot gnu.org
@ 2022-01-16 22:54 ` jakub at gcc dot gnu.org
2022-01-16 22:59 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-16 22:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104052
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
config/aarch64/aarch64-builtins.c: aarch64_fp16_type_node = make_node
(REAL_TYPE);
config/aarch64/aarch64-builtins.c: aarch64_bf16_type_node = make_node
(REAL_TYPE);
config/arm/arm-builtins.c: arm_bf16_type_node = make_node (REAL_TYPE);
config/arm/arm-builtins.c: arm_fp16_type_node = make_node (REAL_TYPE);
config/csky/csky.c: static tree csky_floatHF_type_node = make_node
(REAL_TYPE);
config/i386/i386-builtins.c: ix86_float16_type_node = make_node
(REAL_TYPE);
config/i386/i386-builtins.c: float80_type_node = make_node (REAL_TYPE);
config/ia64/ia64.c: fpreg_type = make_node (REAL_TYPE);
config/ia64/ia64.c: float80_type = make_node (REAL_TYPE);
config/rs6000/rs6000-call.c: ibm128_float_type_node = make_node
(REAL_TYPE);
is all I could find, now the question is what from these types are already in
some global_trees. But the upper bound for target specific floating point
types will be most likely either 2 or 1.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104052] Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble
2022-01-16 16:43 [Bug c++/104052] New: Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble jakub at gcc dot gnu.org
` (2 preceding siblings ...)
2022-01-16 22:54 ` jakub at gcc dot gnu.org
@ 2022-01-16 22:59 ` pinskia at gcc dot gnu.org
2022-01-16 23:19 ` pinskia at gcc dot gnu.org
2022-01-18 22:47 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-16 22:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104052
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There are other types it messes up with too. E.g. the opaque types (PR 98688).
I noticed vector types are not handled correctly either. It assumes all vector
types of the same size are the same which is definitely not true for aarch64.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104052] Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble
2022-01-16 16:43 [Bug c++/104052] New: Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble jakub at gcc dot gnu.org
` (3 preceding siblings ...)
2022-01-16 22:59 ` pinskia at gcc dot gnu.org
@ 2022-01-16 23:19 ` pinskia at gcc dot gnu.org
2022-01-18 22:47 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-16 23:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104052
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-01-16
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Seems like when register_builtin_type is called, there should be another vector
holding those types and handling those in module.cc too. That would fix this
and the vector type issues I think.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/104052] Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble
2022-01-16 16:43 [Bug c++/104052] New: Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble jakub at gcc dot gnu.org
` (4 preceding siblings ...)
2022-01-16 23:19 ` pinskia at gcc dot gnu.org
@ 2022-01-18 22:47 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-18 22:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104052
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|NEW |RESOLVED
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Dup.
*** This bug has been marked as a duplicate of bug 98645 ***
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-01-18 22:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-16 16:43 [Bug c++/104052] New: Modules ICE on powerpc64le-linux with -mabi=ieeelongdouble jakub at gcc dot gnu.org
2022-01-16 22:48 ` [Bug c++/104052] " pinskia at gcc dot gnu.org
2022-01-16 22:50 ` jakub at gcc dot gnu.org
2022-01-16 22:54 ` jakub at gcc dot gnu.org
2022-01-16 22:59 ` pinskia at gcc dot gnu.org
2022-01-16 23:19 ` pinskia at gcc dot gnu.org
2022-01-18 22:47 ` jakub at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).