public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/PR104648-fix-checking-ICE)] Fix error recovery in toplev::finalize.
@ 2022-02-28 10:59 Martin Liska
0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2022-02-28 10:59 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9507a1d30382cebce05f6bea2eb5d08c6390d950
commit 9507a1d30382cebce05f6bea2eb5d08c6390d950
Author: Martin Liska <mliska@suse.cz>
Date: Mon Feb 28 11:58:01 2022 +0100
Fix error recovery in toplev::finalize.
PR ipa/104648
gcc/ChangeLog:
* main.cc (main): Use flag_checking instead of CHECKING_P
and run toplev::finalize only if there is not error seen.
Diff:
---
gcc/main.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/main.cc b/gcc/main.cc
index f9dd6b2af58..4ba28b7de53 100644
--- a/gcc/main.cc
+++ b/gcc/main.cc
@@ -37,9 +37,9 @@ main (int argc, char **argv)
true /* init_signals */);
int r = toplev.main (argc, argv);
-#if CHECKING_P
- toplev.finalize ();
-#endif
+
+ if (flag_checking && !seen_error ())
+ toplev.finalize ();
return r;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gcc(refs/users/marxin/heads/PR104648-fix-checking-ICE)] Fix error recovery in toplev::finalize.
@ 2022-02-28 11:04 Martin Liska
0 siblings, 0 replies; 2+ messages in thread
From: Martin Liska @ 2022-02-28 11:04 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:2e0b3b79bddfb1941bb05fbc52778ea791034add
commit 2e0b3b79bddfb1941bb05fbc52778ea791034add
Author: Martin Liska <mliska@suse.cz>
Date: Mon Feb 28 11:58:01 2022 +0100
Fix error recovery in toplev::finalize.
PR ipa/104648
gcc/ChangeLog:
* main.cc (main): Use flag_checking instead of CHECKING_P
and run toplev::finalize only if there is not error seen.
gcc/testsuite/ChangeLog:
* g++.dg/pr104648.C: New test.
Diff:
---
gcc/main.cc | 6 +++---
gcc/testsuite/g++.dg/pr104648.C | 9 +++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/gcc/main.cc b/gcc/main.cc
index f9dd6b2af58..4ba28b7de53 100644
--- a/gcc/main.cc
+++ b/gcc/main.cc
@@ -37,9 +37,9 @@ main (int argc, char **argv)
true /* init_signals */);
int r = toplev.main (argc, argv);
-#if CHECKING_P
- toplev.finalize ();
-#endif
+
+ if (flag_checking && !seen_error ())
+ toplev.finalize ();
return r;
}
diff --git a/gcc/testsuite/g++.dg/pr104648.C b/gcc/testsuite/g++.dg/pr104648.C
new file mode 100644
index 00000000000..b8b7c2864cf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr104648.C
@@ -0,0 +1,9 @@
+// { dg-do compile }
+// { dg-options "-fvtable-verify=preinit" }
+
+struct A {};
+struct B : virtual A
+{
+ B () {};
+ B () {}; /* { dg-error "cannot be overloaded with" } */
+};
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-28 11:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 10:59 [gcc(refs/users/marxin/heads/PR104648-fix-checking-ICE)] Fix error recovery in toplev::finalize Martin Liska
2022-02-28 11:04 Martin Liska
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).