public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330
@ 2021-08-17 10:24 marxin at gcc dot gnu.org
2021-08-17 10:24 ` [Bug ada/101947] " marxin at gcc dot gnu.org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-17 10:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
Bug ID: 101947
Summary: [12 Regression] Broken Ada bootstrap in
get_base_type_offset, at dwarf2out.c:4330
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
CC: ebotcazou at gcc dot gnu.org
Target Milestone: ---
Bootstrap fails for --with-build-config=bootstrap-lto:
+===========================GNAT BUG DETECTED==============================+
| 12.0.0 20210817 (experimental) (x86_64-pc-linux-gnu) GCC error: |
| in get_base_type_offset, at dwarf2out.c:4330 |
| Error detected around ../../gcc/ada/exp_dist.adb:11655:1 |
| Compiling ../../gcc/ada/exp_dist.adb |
| Please submit a bug report; see https://gcc.gnu.org/bugs/ . |
| Use a subject line meaningful to you and us to track the bug. |
| Include the entire contents of this bug box in the report. |
| Include the exact command that you entered. |
| Also include sources listed below. |
+==========================================================================+
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/101947] [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
@ 2021-08-17 10:24 ` marxin at gcc dot gnu.org
2021-08-17 10:39 ` [Bug ada/101947] [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 since r12-2927-g29020d0527512ae0444ad32b1461b7f8526e7427 marxin at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-17 10:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-08-17
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
I'm bisecting that right now, it's very recent regression..
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/101947] [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 since r12-2927-g29020d0527512ae0444ad32b1461b7f8526e7427
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
2021-08-17 10:24 ` [Bug ada/101947] " marxin at gcc dot gnu.org
@ 2021-08-17 10:39 ` marxin at gcc dot gnu.org
2021-08-17 10:39 ` marxin at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-17 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
Target Milestone|--- |12.0
Summary|[12 Regression] Broken Ada |[12 Regression] Broken Ada
|bootstrap in |bootstrap in
|get_base_type_offset, at |get_base_type_offset, at
|dwarf2out.c:4330 |dwarf2out.c:4330 since
| |r12-2927-g29020d0527512ae04
| |44ad32b1461b7f8526e7427
Known to work| |11.2.0
Known to fail| |12.0
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/101947] [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 since r12-2927-g29020d0527512ae0444ad32b1461b7f8526e7427
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
2021-08-17 10:24 ` [Bug ada/101947] " marxin at gcc dot gnu.org
2021-08-17 10:39 ` [Bug ada/101947] [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 since r12-2927-g29020d0527512ae0444ad32b1461b7f8526e7427 marxin at gcc dot gnu.org
@ 2021-08-17 10:39 ` marxin at gcc dot gnu.org
2021-08-23 9:12 ` marxin at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-17 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-2927-g29020d0527512ae0444ad32b1461b7f8526e7427.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/101947] [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 since r12-2927-g29020d0527512ae0444ad32b1461b7f8526e7427
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
` (2 preceding siblings ...)
2021-08-17 10:39 ` marxin at gcc dot gnu.org
@ 2021-08-23 9:12 ` marxin at gcc dot gnu.org
2021-08-23 9:25 ` ebotcazou at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-23 9:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
@Erik: Can you please take a look?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/101947] [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 since r12-2927-g29020d0527512ae0444ad32b1461b7f8526e7427
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
` (3 preceding siblings ...)
2021-08-23 9:12 ` marxin at gcc dot gnu.org
@ 2021-08-23 9:25 ` ebotcazou at gcc dot gnu.org
2021-08-25 9:55 ` ebotcazou at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-08-23 9:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Not before next week, but there is nothing wrong in the patch itself.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/101947] [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 since r12-2927-g29020d0527512ae0444ad32b1461b7f8526e7427
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
` (4 preceding siblings ...)
2021-08-23 9:25 ` ebotcazou at gcc dot gnu.org
@ 2021-08-25 9:55 ` ebotcazou at gcc dot gnu.org
2021-09-03 8:35 ` [Bug debug/101947] [12 Regression] Broken LTO bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-08-25 9:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Investigating.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/101947] [12 Regression] Broken LTO bootstrap in get_base_type_offset, at dwarf2out.c:4330
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
` (5 preceding siblings ...)
2021-08-25 9:55 ` ebotcazou at gcc dot gnu.org
@ 2021-09-03 8:35 ` marxin at gcc dot gnu.org
2021-09-03 16:05 ` ebotcazou at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-09-03 8:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jamborm at gcc dot gnu.org
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
*** Bug 102187 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/101947] [12 Regression] Broken LTO bootstrap in get_base_type_offset, at dwarf2out.c:4330
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
` (6 preceding siblings ...)
2021-09-03 8:35 ` [Bug debug/101947] [12 Regression] Broken LTO bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
@ 2021-09-03 16:05 ` ebotcazou at gcc dot gnu.org
2021-09-06 8:22 ` [Bug debug/101947] [12 Regression] broken LTO bootstrap in get_base_type_offset " ebotcazou at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-09-03 16:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
It's the DW_AT_byte_size expression in:
(gdb) p debug_dwarf_die (die)
DIE 1041: DW_TAG_structure_type (0x7ffff39f06e0)
abbrev id: 51 offset: 1041 mark: 1
DW_AT_name: "exp_dist__rpc_target"
DW_AT_byte_size: location descriptor:
(0x7ffff39f0dc0) DW_OP_push_object_address 0, 0
(0x7ffff39f0e10) DW_OP_deref_type 4, die -> 0 (0x7ffff39f0af0)
(0x7ffff39f0e60) DW_OP_convert 0, 0
(0x7ffff39f0eb0) DW_OP_call4 die -> 0 (0x7ffff39f0a50), 0
(0x7ffff39f0f50) DW_OP_plus_uconst 7, 0
(0x7ffff39f0fa0) DW_OP_const1s 18446744073709551612, 0
(0x7ffff39f0960) DW_OP_and 0, 0
whose DW_OP_deref_type 4 operation uses:
DIE 0: DW_TAG_base_type (0x7ffff39f0af0)
abbrev id: 21 offset: 0 mark: 1
DW_AT_byte_size: 4
DW_AT_encoding: 5
DW_AT_name: "SIGNED_32"
DW_AT_artificial: 1
that was not initially referenced anywhere.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/101947] [12 Regression] broken LTO bootstrap in get_base_type_offset at dwarf2out.c:4330
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
` (7 preceding siblings ...)
2021-09-03 16:05 ` ebotcazou at gcc dot gnu.org
@ 2021-09-06 8:22 ` ebotcazou at gcc dot gnu.org
2021-09-06 8:51 ` ebotcazou at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-09-06 8:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
The problem is that the dwarf2out_early_finish path does not finalize base
types so calc_die_sizes cannot compute the size of DW_OP_deref_type:
case DW_OP_deref_type:
case DW_OP_GNU_deref_type:
{
unsigned long o
= get_base_type_offset (loc->dw_loc_oprnd2.v.val_die_ref.die);
size += 1 + size_of_uleb128 (o);
}
break;
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/101947] [12 Regression] broken LTO bootstrap in get_base_type_offset at dwarf2out.c:4330
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
` (8 preceding siblings ...)
2021-09-06 8:22 ` [Bug debug/101947] [12 Regression] broken LTO bootstrap in get_base_type_offset " ebotcazou at gcc dot gnu.org
@ 2021-09-06 8:51 ` ebotcazou at gcc dot gnu.org
2021-09-07 13:43 ` cvs-commit at gcc dot gnu.org
2021-09-07 13:44 ` ebotcazou at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-09-06 8:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
--- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Obvious kludge:
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 07a479f6382..fb436b8c77c 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -19484,6 +19491,7 @@ loc_list_from_tree_1 (tree loc, int want_address,
else if (!(context && context->strict_signedness)
|| TYPE_UNSIGNED (TREE_TYPE (loc))
|| (dwarf_strict && dwarf_version < 5)
+ || early_dwarf
|| !is_a <scalar_int_mode> (mode, &int_mode)
|| !(type_die = base_type_for_mode (mode, false)))
deref = new_loc_descr (DW_OP_deref_size, size, 0);
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/101947] [12 Regression] broken LTO bootstrap in get_base_type_offset at dwarf2out.c:4330
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
` (9 preceding siblings ...)
2021-09-06 8:51 ` ebotcazou at gcc dot gnu.org
@ 2021-09-07 13:43 ` cvs-commit at gcc dot gnu.org
2021-09-07 13:44 ` ebotcazou at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-09-07 13:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:81e9178fe7f8bae4609619b1195765b14eef35b7
commit r12-3383-g81e9178fe7f8bae4609619b1195765b14eef35b7
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Sep 7 15:41:49 2021 +0200
Fix PR debug/101947
This is the recent LTO bootstrap failure with Ada enabled. The compiler
now
generates DW_OP_deref_type for a unit of the Ada front-end, which means
that
the offset of base types in the CU must be computed during early DWARF too.
gcc/
PR debug/101947
* dwarf2out.c (mark_base_types): New overloaded function.
(dwarf2out_early_finish): Invoke it on the COMDAT type list as well
as the compilation unit, and call move_marked_base_types afterward.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug debug/101947] [12 Regression] broken LTO bootstrap in get_base_type_offset at dwarf2out.c:4330
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
` (10 preceding siblings ...)
2021-09-07 13:43 ` cvs-commit at gcc dot gnu.org
@ 2021-09-07 13:44 ` ebotcazou at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2021-09-07 13:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101947
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #11 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
This should work again.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2021-09-07 13:44 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-17 10:24 [Bug ada/101947] New: [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
2021-08-17 10:24 ` [Bug ada/101947] " marxin at gcc dot gnu.org
2021-08-17 10:39 ` [Bug ada/101947] [12 Regression] Broken Ada bootstrap in get_base_type_offset, at dwarf2out.c:4330 since r12-2927-g29020d0527512ae0444ad32b1461b7f8526e7427 marxin at gcc dot gnu.org
2021-08-17 10:39 ` marxin at gcc dot gnu.org
2021-08-23 9:12 ` marxin at gcc dot gnu.org
2021-08-23 9:25 ` ebotcazou at gcc dot gnu.org
2021-08-25 9:55 ` ebotcazou at gcc dot gnu.org
2021-09-03 8:35 ` [Bug debug/101947] [12 Regression] Broken LTO bootstrap in get_base_type_offset, at dwarf2out.c:4330 marxin at gcc dot gnu.org
2021-09-03 16:05 ` ebotcazou at gcc dot gnu.org
2021-09-06 8:22 ` [Bug debug/101947] [12 Regression] broken LTO bootstrap in get_base_type_offset " ebotcazou at gcc dot gnu.org
2021-09-06 8:51 ` ebotcazou at gcc dot gnu.org
2021-09-07 13:43 ` cvs-commit at gcc dot gnu.org
2021-09-07 13:44 ` ebotcazou 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).