* [PATCH] Fix ICE in output_rnglists, at dwarf2out.c:12294 [PR100515]
@ 2021-05-12 8:11 Bernd Edlinger
2021-05-12 8:24 ` Richard Biener
0 siblings, 1 reply; 3+ messages in thread
From: Bernd Edlinger @ 2021-05-12 8:11 UTC (permalink / raw)
To: gcc-patches, Richard Biener, Alexandre Oliva
[-- Attachment #1: Type: text/plain, Size: 149 bytes --]
Hi,
this fixes another regression from my previous patch.
Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
Is it OK for trunk?
Thanks
Bernd.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-ICE-in-output_rnglists-at-dwarf2out.c-12294.patch --]
[-- Type: text/x-patch; name="0001-Fix-ICE-in-output_rnglists-at-dwarf2out.c-12294.patch", Size: 1892 bytes --]
From 62da66525c4b7ac1cfd5cad5b8e690ce928802e5 Mon Sep 17 00:00:00 2001
From: Bernd Edlinger <bernd.edlinger@hotmail.de>
Date: Tue, 11 May 2021 17:55:18 +0200
Subject: [PATCH] Fix ICE in output_rnglists, at dwarf2out.c:12294
In this testcase the compile unit consists of a single
text section with a single embedded DECL_IGNORED_P function.
So we have a kind of multi-range text section here.
To avoid an ICE in output_rnglists we need to make sure
that have_multiple_function_sections is set to true.
This is a regression from
e69ac020372 ("Add line debug info for virtual thunks")
2021-05-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR debug/100515
* dwarg2out.c (dwarf2out_finish): Set
have_multiple_function_sections with multi-range text_section.
* gcc.dg/debug/dwarf2/pr100515.c: New testcase.
---
gcc/dwarf2out.c | 1 +
gcc/testsuite/gcc.dg/debug/dwarf2/pr100515.c | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/debug/dwarf2/pr100515.c
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index a5ec21a..1593092 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -31956,6 +31956,7 @@ dwarf2out_finish (const char *filename)
add_AT_addr (main_comp_unit_die, DW_AT_entry_pc, const0_rtx, true);
add_ranges (NULL);
+ have_multiple_function_sections = true;
}
}
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr100515.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr100515.c
new file mode 100644
index 0000000..7c72fcd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr100515.c
@@ -0,0 +1,19 @@
+/* PR debug/100515 */
+/* { dg-do compile } */
+/* { dg-options "-g -O2 -fopenmp" } */
+
+void
+foo (int x)
+{
+#pragma omp taskloop
+ for (int i = 0; i < x; i++)
+ ;
+}
+
+void
+bar (int x)
+{
+#pragma omp taskloop
+ for (int i = 0; i < x; i++)
+ ;
+}
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix ICE in output_rnglists, at dwarf2out.c:12294 [PR100515]
2021-05-12 8:11 [PATCH] Fix ICE in output_rnglists, at dwarf2out.c:12294 [PR100515] Bernd Edlinger
@ 2021-05-12 8:24 ` Richard Biener
2021-05-17 9:30 ` Christophe Lyon
0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2021-05-12 8:24 UTC (permalink / raw)
To: Bernd Edlinger; +Cc: gcc-patches, Alexandre Oliva
On Wed, 12 May 2021, Bernd Edlinger wrote:
> Hi,
>
> this fixes another regression from my previous patch.
>
>
> Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
> Is it OK for trunk?
OK.
Richard.
>
> Thanks
> Bernd.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix ICE in output_rnglists, at dwarf2out.c:12294 [PR100515]
2021-05-12 8:24 ` Richard Biener
@ 2021-05-17 9:30 ` Christophe Lyon
0 siblings, 0 replies; 3+ messages in thread
From: Christophe Lyon @ 2021-05-17 9:30 UTC (permalink / raw)
To: Richard Biener; +Cc: Bernd Edlinger, Alexandre Oliva, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 493 bytes --]
On Wed, 12 May 2021 at 10:24, Richard Biener <rguenther@suse.de> wrote:
>
> On Wed, 12 May 2021, Bernd Edlinger wrote:
>
> > Hi,
> >
> > this fixes another regression from my previous patch.
> >
> >
> > Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
> > Is it OK for trunk?
>
> OK.
>
> Richard.
>
Hi,
As the new test uses -fopenmp, it fails on targets that do not support it.
I've committed the attached patch to skip the test in such cases.
Christophe
> >
> > Thanks
> > Bernd.
> >
[-- Attachment #2: pr100515.testsuite.patch --]
[-- Type: text/x-patch, Size: 1034 bytes --]
commit b050cf6a4d9c305daff4a96e5a2489ece69dc287
Author: Christophe Lyon <christophe.lyon@linaro.org>
Date: Mon May 17 09:25:43 2021 +0000
testsuite: Require openmp effective-target for PR100515
The related test uses -fopenmp, which is not supported by newlib-based
targets such as arm-eabi or aarch64-elf.
Requiring the openmp effective-target makes the test unsupported
rather than failed.
2021-05-17 Christophe Lyon <christophe.lyon@linaro.org>
PR debug/100515
gcc/testsuite
* gcc.dg/debug/dwarf2/pr100515.c: Require openmp effective-target.
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr100515.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr100515.c
index 7c72fcd6693..17f6463cc6e 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr100515.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr100515.c
@@ -1,5 +1,6 @@
/* PR debug/100515 */
/* { dg-do compile } */
+/* { dg-require-effective-target fopenmp } */
/* { dg-options "-g -O2 -fopenmp" } */
void
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-17 9:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 8:11 [PATCH] Fix ICE in output_rnglists, at dwarf2out.c:12294 [PR100515] Bernd Edlinger
2021-05-12 8:24 ` Richard Biener
2021-05-17 9:30 ` Christophe Lyon
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).