Commit 89cfdb7e by Jakub Jelinek Committed by Jakub Jelinek

re PR rtl-optimization/89234 (ICE in get_eh_region_and_lp_from_rtx at gcc/except.c:1824)

	PR rtl-optimization/89234
	* except.c (copy_reg_eh_region_note_forward): Return if note_or_insn
	is a NOTE, CODE_LABEL etc. - rtx_insn * other than INSN_P.
	(copy_reg_eh_region_note_backward): Likewise.

	* g++.dg/ubsan/pr89234.C: New test.

From-SVN: r268669
parent 4af50e13
2019-02-08 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/89234
* except.c (copy_reg_eh_region_note_forward): Return if note_or_insn
is a NOTE, CODE_LABEL etc. - rtx_insn * other than INSN_P.
(copy_reg_eh_region_note_backward): Likewise.
2019-02-08 Richard Biener <rguenther@suse.de> 2019-02-08 Richard Biener <rguenther@suse.de>
PR middle-end/89223 PR middle-end/89223
......
...@@ -1756,6 +1756,8 @@ copy_reg_eh_region_note_forward (rtx note_or_insn, rtx_insn *first, rtx last) ...@@ -1756,6 +1756,8 @@ copy_reg_eh_region_note_forward (rtx note_or_insn, rtx_insn *first, rtx last)
if (note == NULL) if (note == NULL)
return; return;
} }
else if (is_a <rtx_insn *> (note_or_insn))
return;
note = XEXP (note, 0); note = XEXP (note, 0);
for (insn = first; insn != last ; insn = NEXT_INSN (insn)) for (insn = first; insn != last ; insn = NEXT_INSN (insn))
...@@ -1778,6 +1780,8 @@ copy_reg_eh_region_note_backward (rtx note_or_insn, rtx_insn *last, rtx first) ...@@ -1778,6 +1780,8 @@ copy_reg_eh_region_note_backward (rtx note_or_insn, rtx_insn *last, rtx first)
if (note == NULL) if (note == NULL)
return; return;
} }
else if (is_a <rtx_insn *> (note_or_insn))
return;
note = XEXP (note, 0); note = XEXP (note, 0);
for (insn = last; insn != first; insn = PREV_INSN (insn)) for (insn = last; insn != first; insn = PREV_INSN (insn))
......
2019-02-08 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/89234
* g++.dg/ubsan/pr89234.C: New test.
2019-02-08 Richard Biener <rguenther@suse.de> 2019-02-08 Richard Biener <rguenther@suse.de>
PR middle-end/89223 PR middle-end/89223
......
// PR rtl-optimization/89234
// { dg-do compile { target dfp } }
// { dg-options "-O2 -fnon-call-exceptions -fsanitize=null" }
typedef float __attribute__((mode (SD))) _Decimal32;
void
foo (_Decimal32 *b, _Decimal32 c)
{
*b = c + 1.5;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment