From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A7C0B3857C7E; Sat, 31 Oct 2020 08:05:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7C0B3857C7E From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/97652] New: New pdt14 failure after g:617695cdc2b3d950f1e4deb5ea85d5cc302943f4 Date: Sat, 31 Oct 2020 08:05:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2020 08:05:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97652 Bug ID: 97652 Summary: New pdt14 failure after g:617695cdc2b3d950f1e4deb5ea85d5cc302943f4 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: hubicka at gcc dot gnu.org Target Milestone: --- pdt14 is miscompiled with -fipa-modref. This is triggered by handling fnsp= ec, but it seems to only trigger latent problem. The only disambiguations are: ipa-modref: call stmt push_8 (&root, &C.4105); ipa-modref: call to push_8/6 does not clobber ref: __vtab_link_module_Pdtlink_8._deallocate alias sets: 12->11 ipa-modref: call stmt push_8 (&root, &C.4104); ipa-modref: call to push_8/6 does not clobber ref: __vtab_link_module_Pdtlink_8._deallocate alias sets: 12->11 ipa-modref: call stmt push_8 (&root, &C.4103); ipa-modref: call to push_8/6 does not clobber ref: __vtab_link_module_Pdtlink_8._deallocate alias sets: 12->11 ipa-modref: call stmt push_8 (&root, &C.4105); ipa-modref: call to push_8/6 does not clobber ref: __vtab_link_module_Pdtlink_8._deallocate alias sets: 12->11 ipa-modref: call stmt push_8 (&root, &C.4104); ipa-modref: call to push_8/6 does not clobber ref: __vtab_link_module_Pdtlink_8._deallocate alias sets: 12->11 ipa-modref: call stmt push_8 (&root, &C.4103); ipa-modref: call to push_8/6 does not clobber ref: __vtab_link_module_Pdtlink_8._deallocate alias sets: 12->11 these ought to be safe since __vtab_link_module_Pdtlink_8 is readonly in the testcase. With LTO we detect that variable as such (and the testcase stil w= ork without modref and fails different with modref). fre3 does quite a lot of additional changes and I am not sure what gets wro= ng here: __attribute__((externally_visible)) main (integer(kind=3D4) argc, character(kind=3D1) * * argv) { + struct array01_unknown cdesc.10; + struct array01_unknown cdesc.9; + real(kind=3D8) res; + struct Pdtlink_8 * previous; + struct Pdtlink_8 * current; + real(kind=3D8) res; struct pdtlink_8 * root; static integer(kind=3D4) options.11[7] =3D {2150, 4095, 1, 1, 1, 0, 31}; - real(kind=3D8) _7; - integer(kind=3D4) _8; - real(kind=3D8) _9; - integer(kind=3D4) _10; - real(kind=3D8) _11; - integer(kind=3D4) _12; - real(kind=3D8) _13; - integer(kind=3D4) _14; + struct Pdtlink_8 * _15; + struct Pdtlink_8 * _17; + struct Pdtlink_8 * _21; + struct Pdtlink_8 * _22; + void (*) () _23; + struct Pdtlink_8 * _25; + void (*) () _26; [local count: 1073741824]: _gfortran_set_args (argc_2(D), argv_3(D)); @@ -1972,52 +2120,75 @@ push_8 (&root, &C.4103); push_8 (&root, &C.4104); push_8 (&root, &C.4105); - _7 =3D pop_8 (&root); - _8 =3D (integer(kind=3D4)) _7; - if (_8 !=3D 3) - goto ; [0.04%] + _15 =3D MEM[(struct Pdtlink_8 * &)&root]; + if (_15 !=3D 0B) + goto ; [70.00%] else - goto ; [99.96%] + goto ; [30.00%] - [local count: 429496]: - _gfortran_stop_numeric (1, 0); - - [local count: 1073312329]: - _9 =3D pop_8 (&root); - _10 =3D (integer(kind=3D4)) _9; - if (_10 !=3D 2) - goto ; [0.04%] + [local count: 75913541732]: + # current_16 =3D PHI <_15(2), _17(3)> + # previous_29 =3D PHI <_15(2), current_16(3)> + _17 =3D current_16->next; + if (_17 =3D=3D 0B) + goto ; [0.00%] else - goto ; [99.96%] - - [local count: 429324]: - _gfortran_stop_numeric (2, 0); + goto ; [100.00%] - [local count: 1072883005]: - _11 =3D pop_8 (&root); - _12 =3D (integer(kind=3D4)) _11; - if (_12 !=3D 1) - goto ; [0.04%] + [count: 0]: + res_19 =3D current_16->n; + _21 =3D previous_29->next; + if (_21 =3D=3D 0B) + goto ; [30.00%] else - goto ; [99.96%] + goto ; [70.00%] - [local count: 429152]: - _gfortran_stop_numeric (3, 0); + [count: 0]: + _22 =3D _15->next; + if (_22 !=3D 0B) + goto ; [70.00%] + else + goto ; [30.00%] - [local count: 1072453853]: - _13 =3D pop_8 (&root); - _14 =3D (integer(kind=3D4)) _13; - if (_14 !=3D 0) - goto ; [0.04%] + [count: 0]: + MEM [(struct dtype_type *)&cdesc.9 + 24B] =3D {}; + cdesc.9.dtype.elem_len =3D 24; + cdesc.9.dtype.rank =3D 1; + cdesc.9.dtype.type =3D 11; + cdesc.9.dim[0].lbound =3D 1; + cdesc.9.dim[0].stride =3D 1; + cdesc.9.dim[0].ubound =3D 1; + cdesc.9.data =3D _22; + _23 =3D __vtab_link_module_Pdtlink_8._deallocate; + __builtin_unreachable (); + + [count: 0]: + __builtin_unreachable (); + + [count: 0]: + _25 =3D _21->next; + if (_25 !=3D 0B) + goto ; [70.00%] else - goto ; [99.96%] + goto ; [30.00%] + + [count: 0]: + MEM [(struct dtype_type *)&cdesc.10 + 24B] =3D {}; + cdesc.10.dtype.elem_len =3D 24; + cdesc.10.dtype.rank =3D 1; + cdesc.10.dtype.type =3D 11; + cdesc.10.dim[0].lbound =3D 1; + cdesc.10.dim[0].stride =3D 1; + cdesc.10.dim[0].ubound =3D 1; + cdesc.10.data =3D _25; + _26 =3D __vtab_link_module_Pdtlink_8._deallocate; + __builtin_unreachable (); - [local count: 428981]: - _gfortran_stop_numeric (4, 0); + [count: 0]: + __builtin_unreachable (); - [local count: 1072024872]: - root =3D{v} {CLOBBER}; - return 0; + [local count: 128815]: + _gfortran_stop_numeric (1, 0);=