public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges
@ 2008-06-17 17:46 laurent at guerby dot net
2008-06-17 17:49 ` [Bug middle-end/36554] " pinskia at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: laurent at guerby dot net @ 2008-06-17 17:46 UTC (permalink / raw)
To: gcc-bugs
This doesn't ICE with gcc 4.3.1, may be by luck.
$ cat pt.ads
package PT is
function S (V : in Long_Float) return String;
end PT;
$ cat pt.adb
package body Pt is
function Long_Float_Is_Valid (X : in Long_Float) return Boolean is
Is_Nan : constant Boolean := X /= X;
Is_P_Inf : constant Boolean := X > Long_Float'Last;
Is_M_Inf : constant Boolean := X < Long_Float'First;
Is_Invalid : constant Boolean := Is_Nan or Is_P_Inf or Is_M_Inf;
begin
return not Is_Invalid;
end Long_Float_Is_Valid;
function S (V : in Long_Float) return String is
begin
if not Long_Float_Is_Valid (V) then
return "INVALID";
else
return "OK";
end if;
exception
when others =>
return "ERROR";
end S;
end Pt;
$ gcc -c -O2 pt.adb
pt.adb: In function 'Pt.S':
pt.adb:12: error: BB 2 can not throw but has EH edges
pt.adb:12: error: BB 3 can not throw but has EH edges
+===========================GNAT BUG DETECTED==============================+
| 4.4.0 20080617 (experimental) [trunk revision 136861]
(x86_64-unknown-linux-gnu) GCC error:|
| verify_flow_info failed |
| Error detected around pt.adb:12 |
--
Summary: [4.4 regression] verify_flow_info ICE can not throw but
has EH edges
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: laurent at guerby dot net
GCC host triplet: x86_64-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
@ 2008-06-17 17:49 ` pinskia at gcc dot gnu dot org
2008-06-25 12:13 ` rguenth at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-06-17 17:49 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Component|ada |middle-end
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
2008-06-17 17:49 ` [Bug middle-end/36554] " pinskia at gcc dot gnu dot org
@ 2008-06-25 12:13 ` rguenth at gcc dot gnu dot org
2008-06-25 20:05 ` laurent at guerby dot net
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-25 12:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-06-25 12:12 -------
C testcase?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
2008-06-17 17:49 ` [Bug middle-end/36554] " pinskia at gcc dot gnu dot org
2008-06-25 12:13 ` rguenth at gcc dot gnu dot org
@ 2008-06-25 20:05 ` laurent at guerby dot net
2008-06-25 21:11 ` ebotcazou at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: laurent at guerby dot net @ 2008-06-25 20:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from laurent at guerby dot net 2008-06-25 20:04 -------
To my knowledge there's no exception in C and I know next to nothing in C++ so
I unfortunately can't contribute a c++ testcase. May be Eric can help?
--
laurent at guerby dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
` (2 preceding siblings ...)
2008-06-25 20:05 ` laurent at guerby dot net
@ 2008-06-25 21:11 ` ebotcazou at gcc dot gnu dot org
2008-06-26 11:03 ` ebotcazou at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-06-25 21:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ebotcazou at gcc dot gnu dot org 2008-06-25 21:11 -------
Investigating.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ebotcazou at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-06-25 21:11:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
` (3 preceding siblings ...)
2008-06-25 21:11 ` ebotcazou at gcc dot gnu dot org
@ 2008-06-26 11:03 ` ebotcazou at gcc dot gnu dot org
2008-06-26 11:20 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-06-26 11:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from ebotcazou at gcc dot gnu dot org 2008-06-26 11:02 -------
The new forward_propagate_comparison in tree-ssa-forwprop.c screws up the CFG:
<bb 2>:
D.1416_13 = v_1(D) != v_1(D);
is_nan_6 = (const boolean) D.1416_13;
D.1402_28 = v_1(D) > 1.79769313486231570814527423731704356798070567526e+308;
<bb 3>:
is_p_inf_22 = (const boolean) D.1402_28;
D.1403_29 = v_1(D) < -1.79769313486231570814527423731704356798070567526e+308;
<bb 4>:
is_m_inf_36 = (const boolean) D.1403_29;
is turned into
<bb 2>:
is_nan_6 = v_1(D) != v_1(D);
<bb 3>:
is_p_inf_22 = v_1(D) >
1.79769313486231570814527423731704356798070567526e+308;
<bb 4>:
is_m_inf_36 = v_1(D) <
-1.79769313486231570814527423731704356798070567526e+308;
without any EH updating. The idiom used in tidy_after_forward_propagate_addr
/* We may have turned a trapping insn into a non-trapping insn. */
if (maybe_clean_or_replace_eh_stmt (stmt, stmt)
&& tree_purge_dead_eh_edges (bb_for_stmt (stmt)))
cfg_changed = true;
wouldn't be sufficient here because statements are removed (is it really the
job of the pass to remove statements?)
But all this mess stems again from the non-canonical "boolean" type of Ada so
it's probably worth trying to make it canonical at last...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
` (4 preceding siblings ...)
2008-06-26 11:03 ` ebotcazou at gcc dot gnu dot org
@ 2008-06-26 11:20 ` rguenth at gcc dot gnu dot org
2008-07-02 20:20 ` ebotcazou at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-26 11:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2008-06-26 11:19 -------
The fix would be to not propagate the comparisons if they can throw.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
` (5 preceding siblings ...)
2008-06-26 11:20 ` rguenth at gcc dot gnu dot org
@ 2008-07-02 20:20 ` ebotcazou at gcc dot gnu dot org
2008-07-14 21:50 ` ebotcazou at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-07-02 20:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ebotcazou at gcc dot gnu dot org 2008-07-02 20:20 -------
> The fix would be to not propagate the comparisons if they can throw.
OK, thanks for the tip. The patch to convert Ada to a canonical boolean type
is written though (and eliminates the ICE as expected), I'm just waiting for
the GDB people to adjust the Ada module.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
` (6 preceding siblings ...)
2008-07-02 20:20 ` ebotcazou at gcc dot gnu dot org
@ 2008-07-14 21:50 ` ebotcazou at gcc dot gnu dot org
2008-07-18 16:52 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-07-14 21:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ebotcazou at gcc dot gnu dot org 2008-07-14 21:50 -------
> OK, thanks for the tip. The patch to convert Ada to a canonical boolean type
> is written though (and eliminates the ICE as expected), I'm just waiting for
> the GDB people to adjust the Ada module.
This will be further delayed, the Ada compiler has been in poor shape for a
week and I'll be away for some time.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug middle-end/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
` (7 preceding siblings ...)
2008-07-14 21:50 ` ebotcazou at gcc dot gnu dot org
@ 2008-07-18 16:52 ` rguenth at gcc dot gnu dot org
2008-07-30 23:41 ` [Bug ada/36554] " ebotcazou at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-07-18 16:52 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
` (8 preceding siblings ...)
2008-07-18 16:52 ` rguenth at gcc dot gnu dot org
@ 2008-07-30 23:41 ` ebotcazou at gcc dot gnu dot org
2008-07-30 23:57 ` ebotcazou at gcc dot gnu dot org
2008-07-31 0:01 ` ebotcazou at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-07-30 23:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from ebotcazou at gcc dot gnu dot org 2008-07-30 23:39 -------
Recategorizing.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |ada
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
` (9 preceding siblings ...)
2008-07-30 23:41 ` [Bug ada/36554] " ebotcazou at gcc dot gnu dot org
@ 2008-07-30 23:57 ` ebotcazou at gcc dot gnu dot org
2008-07-31 0:01 ` ebotcazou at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-07-30 23:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from ebotcazou at gcc dot gnu dot org 2008-07-30 23:56 -------
Subject: Bug 36554
Author: ebotcazou
Date: Wed Jul 30 23:54:56 2008
New Revision: 138348
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138348
Log:
PR ada/36554
* dwarf2out.c (is_subrange_type): Deal with BOOLEAN_TYPE.
ada/
* back_end.adb (Call_Back_End): Pass Standard_Boolean to gigi.
* gcc-interface/gigi.h (gigi): Take new standard_boolean parameter.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Subtype>:
Set precision to 1 for subtype of BOOLEAN_TYPE.
(set_rm_size): Set TYPE_RM_SIZE_NUM for BOOLEAN_TYPE.
(make_type_from_size): Deal with BOOLEAN_TYPE.
* gcc-interface/misc.c (gnat_print_type): Likewise.
* gcc-interface/trans.c (gigi): Take new standard_boolean parameter.
Set boolean_type_node as its translation in the table, as well
as boolean_false_node for False and boolean_true_node for True.
* gcc-interface/utils.c (gnat_init_decl_processing): Create custom
8-bit boolean_type_node and set its TYPE_RM_SIZE_NUM.
(create_param_decl): Deal with BOOLEAN_TYPE.
(build_vms_descriptor): Likewise.
(build_vms_descriptor64): Likewise.
(convert): Deal with BOOLEAN_TYPE like with ENUMERAL_TYPE.
Added:
trunk/gcc/testsuite/gnat.dg/boolean_expr.adb
trunk/gcc/testsuite/gnat.dg/boolean_expr.ads
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/back_end.adb
trunk/gcc/ada/gcc-interface/decl.c
trunk/gcc/ada/gcc-interface/gigi.h
trunk/gcc/ada/gcc-interface/misc.c
trunk/gcc/ada/gcc-interface/trans.c
trunk/gcc/ada/gcc-interface/utils.c
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug ada/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
` (10 preceding siblings ...)
2008-07-30 23:57 ` ebotcazou at gcc dot gnu dot org
@ 2008-07-31 0:01 ` ebotcazou at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2008-07-31 0:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from ebotcazou at gcc dot gnu dot org 2008-07-30 23:59 -------
Sort of.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|ebotcazou at gcc dot gnu dot|
|org |
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36554
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2008-07-31 0:01 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-17 17:46 [Bug ada/36554] New: [4.4 regression] verify_flow_info ICE can not throw but has EH edges laurent at guerby dot net
2008-06-17 17:49 ` [Bug middle-end/36554] " pinskia at gcc dot gnu dot org
2008-06-25 12:13 ` rguenth at gcc dot gnu dot org
2008-06-25 20:05 ` laurent at guerby dot net
2008-06-25 21:11 ` ebotcazou at gcc dot gnu dot org
2008-06-26 11:03 ` ebotcazou at gcc dot gnu dot org
2008-06-26 11:20 ` rguenth at gcc dot gnu dot org
2008-07-02 20:20 ` ebotcazou at gcc dot gnu dot org
2008-07-14 21:50 ` ebotcazou at gcc dot gnu dot org
2008-07-18 16:52 ` rguenth at gcc dot gnu dot org
2008-07-30 23:41 ` [Bug ada/36554] " ebotcazou at gcc dot gnu dot org
2008-07-30 23:57 ` ebotcazou at gcc dot gnu dot org
2008-07-31 0:01 ` ebotcazou at gcc dot gnu dot 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).