* [Bug ipa/61998] [4.10 Regression] ICE: Segmentation fault with -Wsuggest-final-types
2014-08-02 16:28 [Bug ipa/61998] New: [4.10 Regression] ICE: Segmentation fault with -Wsuggest-final-types trippels at gcc dot gnu.org
@ 2014-08-04 10:05 ` rguenth at gcc dot gnu.org
2014-08-22 19:32 ` [Bug ipa/61998] [5 " reichelt at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-08-04 10:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61998
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.10.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/61998] [5 Regression] ICE: Segmentation fault with -Wsuggest-final-types
2014-08-02 16:28 [Bug ipa/61998] New: [4.10 Regression] ICE: Segmentation fault with -Wsuggest-final-types trippels at gcc dot gnu.org
2014-08-04 10:05 ` [Bug ipa/61998] " rguenth at gcc dot gnu.org
@ 2014-08-22 19:32 ` reichelt at gcc dot gnu.org
2014-08-22 21:55 ` hubicka at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-08-22 19:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61998
Volker Reichelt <reichelt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-08-22
CC| |reichelt at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Confirmed. I tripped over the same bug today.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/61998] [5 Regression] ICE: Segmentation fault with -Wsuggest-final-types
2014-08-02 16:28 [Bug ipa/61998] New: [4.10 Regression] ICE: Segmentation fault with -Wsuggest-final-types trippels at gcc dot gnu.org
2014-08-04 10:05 ` [Bug ipa/61998] " rguenth at gcc dot gnu.org
2014-08-22 19:32 ` [Bug ipa/61998] [5 " reichelt at gcc dot gnu.org
@ 2014-08-22 21:55 ` hubicka at gcc dot gnu.org
2014-08-22 21:58 ` trippels at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hubicka at gcc dot gnu.org @ 2014-08-22 21:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61998
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Markus, can you add attachment?
LTO doesn't really know what C++ language flags was used. I guess because the
flags are not on by default, prople will use it only if they actually want to
use finals...
Docs already mentions it is C++11...
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/61998] [5 Regression] ICE: Segmentation fault with -Wsuggest-final-types
2014-08-02 16:28 [Bug ipa/61998] New: [4.10 Regression] ICE: Segmentation fault with -Wsuggest-final-types trippels at gcc dot gnu.org
` (2 preceding siblings ...)
2014-08-22 21:55 ` hubicka at gcc dot gnu.org
@ 2014-08-22 21:58 ` trippels at gcc dot gnu.org
2014-08-22 22:26 ` hubicka at ucw dot cz
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-08-22 21:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61998
--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #2)
> Markus, can you add attachment?
Well, an empty testcase is enough. Or:
% echo "int main () {}" | g++ -Wsuggest-final-types -O2 -x c++ -
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/61998] [5 Regression] ICE: Segmentation fault with -Wsuggest-final-types
2014-08-02 16:28 [Bug ipa/61998] New: [4.10 Regression] ICE: Segmentation fault with -Wsuggest-final-types trippels at gcc dot gnu.org
` (3 preceding siblings ...)
2014-08-22 21:58 ` trippels at gcc dot gnu.org
@ 2014-08-22 22:26 ` hubicka at ucw dot cz
2014-09-19 14:44 ` trippels at gcc dot gnu.org
2014-09-19 14:48 ` trippels at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: hubicka at ucw dot cz @ 2014-08-22 22:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61998
--- Comment #4 from Jan Hubicka <hubicka at ucw dot cz> ---
I suppose VECtors do not like to grow to 0 size. THe following patch fixes the
ICE, does it also fixe you real testcases?
Index: ipa-devirt.c
===================================================================
--- ipa-devirt.c (revision 214303)
+++ ipa-devirt.c (working copy)
@@ -3822,6 +3845,9 @@ ipa_devirt (void)
int nmultiple = 0, noverwritable = 0, ndevirtualized = 0, nnotdefined = 0;
int nwrong = 0, nok = 0, nexternal = 0, nartificial = 0;
+ if (!odr_types.length ())
+ return 0;
+
/* We can output -Wsuggest-final-methods and -Wsuggest-final-types warnings.
This is implemented by setting up final_warning_records that are updated
by get_polymorphic_call_targets.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/61998] [5 Regression] ICE: Segmentation fault with -Wsuggest-final-types
2014-08-02 16:28 [Bug ipa/61998] New: [4.10 Regression] ICE: Segmentation fault with -Wsuggest-final-types trippels at gcc dot gnu.org
` (4 preceding siblings ...)
2014-08-22 22:26 ` hubicka at ucw dot cz
@ 2014-09-19 14:44 ` trippels at gcc dot gnu.org
2014-09-19 14:48 ` trippels at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-09-19 14:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61998
--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Author: trippels
Date: Fri Sep 19 14:44:09 2014
New Revision: 215392
URL: https://gcc.gnu.org/viewcvs?rev=215392&root=gcc&view=rev
Log:
PR ipa/61998 Fix crash -Wsuggest-final-types crash
-Wsuggest-final-types crashes when used on mininal testcases.
Fix by bailing out early when odr_types_ptr is NULL in ipa_devirt()
2014-09-19 Markus Trippelsdorf <markus@trippelsdorf.de>
PR ipa/61998
* ipa-devirt.c (ipa_devirt): Bail out if odr_types_ptr is NULL.
2014-09-19 Markus Trippelsdorf <markus@trippelsdorf.de>
PR ipa/61998
* g++.dg/warn/Wsuggest-final-2.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/warn/Wsuggest-final-2.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-devirt.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug ipa/61998] [5 Regression] ICE: Segmentation fault with -Wsuggest-final-types
2014-08-02 16:28 [Bug ipa/61998] New: [4.10 Regression] ICE: Segmentation fault with -Wsuggest-final-types trippels at gcc dot gnu.org
` (5 preceding siblings ...)
2014-09-19 14:44 ` trippels at gcc dot gnu.org
@ 2014-09-19 14:48 ` trippels at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-09-19 14:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61998
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Assignee|unassigned at gcc dot gnu.org |trippels at gcc dot gnu.org
--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread