https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103766
--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
example optimised tree dump:
O0
;; Function sub (sub.0, funcdef_no=1, decl_uid=2979, cgraph_uid=1,
symbol_order=0)
__attribute__((fn spec (". ")))
void sub ()
{
struct __st_parameter_dt dt_parm.0;
real(kind=4) * a.2_1;
<bb 2> :
dt_parm.0.common.filename = &"t.f90"[1]{lb: 1 sz: 1};
dt_parm.0.common.line = 8;
dt_parm.0.common.flags = 128;
dt_parm.0.common.unit = 6;
_gfortran_st_write (&dt_parm.0);
a.2_1 = &CHAIN.4_8(D)->a;
_gfortran_transfer_real_write (&dt_parm.0, a.2_1, 4);
_gfortran_st_write_done (&dt_parm.0);
dt_parm.0 ={v} {CLOBBER};
return;
}
;; Function crash (MAIN__, funcdef_no=0, decl_uid=2977, cgraph_uid=2,
symbol_order=1)
__attribute__((fn spec (". ")))
void crash ()
{
struct FRAME.crash FRAME.3;
real(kind=4) a [value-expr: FRAME.3.a];
real(kind=4) D.2991;
real(kind=4) _3;
<bb 2> :
FRAME.3.FRAME_BASE.PARENT = 0B;
_3 = 1.0e+0;
FRAME.3.a = _3;
sub (); [static-chain: &FRAME.3]
GIMPLE_NOP
return;
}
;; Function main (main, funcdef_no=2, decl_uid=2983, cgraph_uid=3,
symbol_order=2)
__attribute__((externally_visible))
integer(kind=4) main (integer(kind=4) argc, character(kind=1) * * argv)
{
static integer(kind=4) options.1[7] = {2116, 4095, 0, 1, 1, 0, 31};
integer(kind=4) D.2993;
integer(kind=4) _7;
<bb 2> :
_gfortran_set_args (argc_2(D), argv_3(D));
_gfortran_set_options (7, &options.1[0]);
crash ();
_7 = 0;
<bb 3> :
<L0>:
return _7;
}
O1
;; Function sub (sub.0, funcdef_no=1, decl_uid=2979, cgraph_uid=1,
symbol_order=0) (executed once)
__attribute__((fn spec (". ")))
void sub ()
{
struct __st_parameter_dt dt_parm.0;
real(kind=4) * a.2_1;
<bb 2> [local count: 1073741824]:
dt_parm.0.common.filename = &"t.f90"[1]{lb: 1 sz: 1};
dt_parm.0.common.line = 8;
dt_parm.0.common.flags = 128;
dt_parm.0.common.unit = 6;
_gfortran_st_write (&dt_parm.0);
a.2_1 = &CHAIN.4_8(D)->a;
_gfortran_transfer_real_write (&dt_parm.0, a.2_1, 4);
_gfortran_st_write_done (&dt_parm.0);
dt_parm.0 ={v} {CLOBBER};
return;
}
;; Function main (main, funcdef_no=2, decl_uid=2983, cgraph_uid=3,
symbol_order=2) (executed once)
__attribute__((externally_visible))
integer(kind=4) main (integer(kind=4) argc, character(kind=1) * * argv)
{
struct FRAME.crash FRAME.3;
static integer(kind=4) options.1[7] = {2116, 4095, 0, 1, 1, 0, 31};
<bb 2> [local count: 1073741824]:
_gfortran_set_args (argc_2(D), argv_3(D));
_gfortran_set_options (7, &options.1[0]);
sub (); [static-chain: &FRAME.3]
return 0;
}