https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115804
--- Comment #4 from Stefan Schulze Frielinghaus <stefansf at gcc dot gnu.org>
---
Breakpoint 12, gimplify_stmt (stmt_p=0x3fff76306c0, seq_p=0x3ffffff7f50) at
/devel/src/gcc/gimplify.cc:7590
7590 last = gimple_seq_last (*seq_p);
(gdb) call debug(*stmt_p)
{
a = 1.0e+0;
b = 0.0;
if (__builtin_isfinite (a / b) == 0)
{
m2pim_M2RTS_RealValueException ((PROC *)
"/devel/src/gcc/testsuite/gm2/switches/check-all/run/fail/realrange.mod", 26,
11, (PROC *) "procedure \'_M2_realrange_init\'", (PROC *) "floating point / has
caused an overflow");
}
else
{
}
_T28 = a / b;
if (__builtin_isfinite (_T28) == 0)
{
m2pim_M2RTS_AssignmentException ((PROC *)
"/devel/src/gcc/testsuite/gm2/switches/check-all/run/fail/realrange.mod", 26,
4, (PROC *) "program module realrange", (PROC *) "assignment will cause a range
error, as the runtime instance value of \'REAL\' does not overlap with the type
\'REAL\'");
}
else
{
}
c = _T28;
}
(gdb) call debug_tree (*stmt_p)
...
stmt <cond_expr 0x3fff76083f0 type <void_type 0x3fff7600f18 PROC>
side-effects
arg:0 <eq_expr 0x3fff764b578 type <pointer_type 0x3fff7607000
ADDRESS>
side-effects
arg:0 <call_expr 0x3fff75f15b0 type <pointer_type 0x3fff7607000
ADDRESS>
side-effects
fn <addr_expr 0x3fff764d260 type <pointer_type
0x3fff763b690>
constant arg:0 <function_decl 0x3fff7614500
__builtin_isfinite>>
arg:0 <rdiv_expr 0x3fff764b550 type <real_type
0x3fff7607348 REAL>
used arg:0 <var_decl 0x3fff75fc3f0 a> arg:1 <var_decl
0x3fff75fc480 b>
/devel/src/gcc/testsuite/gm2/switches/check-all/run/fail/realrange.mod:26:11
start: /devel/src/gcc/testsuite/g
m2/switches/check-all/run/fail/realrange.mod:26:9 finish:
/devel/src/gcc/testsuite/gm2/switches/check-all/run/fail/realrange.mod:26:13>
/devel/src/gcc/testsuite/gm2/switches/check-all/run/fail/realrange.mod:26:11
start: /devel/src/gcc/testsuite/gm2/s
witches/check-all/run/fail/realrange.mod:26:9 finish:
/devel/src/gcc/testsuite/gm2/switches/check-all/run/fail/realrange.mod:26:13>
arg:1 <integer_cst 0x3fff75f3cc0 constant 0>
...
(gdb) call debug_tree((tree)0x3fff7607000)
<pointer_type 0x3fff7607000 ADDRESS
type <void_type 0x3fff7600f18 PROC asm_written VOID
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x3fff7600f18
pointer_to_this <pointer_type 0x3fff7607000 ADDRESS>>
sizes-gimplified public unsigned DI
size <integer_cst 0x3fff75f3930 type <integer_type 0x3fff76000a8
bitsizetype> constant 64>
unit-size <integer_cst 0x3fff75f3948 type <integer_type 0x3fff7600000
sizetype> constant 8>
align:64 warn_if_not_align:0 symtab:1023 alias-set 1 canonical-type
0x3fff7607000
pointer_to_this <pointer_type 0x3fff760d498>>
So the void* type is already set prior gimplify_stmt