Command line: $ gfortran -O[0123] -fprofile-generate dynamic_dispatch_6.f03 $ rm dynamic_dispatch_6.gcda $ ./a.out $ gfortran -O[0123] -fprofile-use dynamic_dispatch_6.f03 Compiler output: $ gfortran -fprofile-generate dynamic_dispatch_6.f03 $ rm dynamic_dispatch_6.gcda $ ./a.out $ gfortran -fprofile-use dynamic_dispatch_6.f03 dynamic_dispatch_6.f03: In function 'MAIN__': dynamic_dispatch_6.f03:59:0: error: invalid conversion in gimple call struct class$field_p struct class$field_p D.1711 = new_periodic_5th_order (&field_creator); dynamic_dispatch_6.f03:59:0: internal compiler error: verify_stmts failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Tested revisions: r162456 - crash r158095 - crash 4.5 r160526 - crash
struct class$field_p struct class$field_p looks more like a frontend issue.
With 4.7 I get instead of an ICE just the warning: dynamic_dispatch_6.f03: In function ‘MAIN__’: dynamic_dispatch_6.f03:66:0: note: Skipping target new_periodic_5th_order with mismatching types for icall Cf. check_ic_target in value-prof.c. The sanity check makes sure that there is no ICE with indirect call targets. The note is printed after the following check: if (gimple_check_call_matching_types (call_stmt, target->decl)) return true; I have not checked whether that check should be true, though I somehow expect that it should be for this example.
(In reply to comment #2) > With 4.7 I get instead of an ICE just the warning: Same with curent 4.8 trunk: dynamic_dispatch_6.f03:66:0: note: Skipping target new_periodic_5th_order with mismatching types for icall u => field_creator%create()
(In reply to janus from comment #3) > > With 4.7 I get instead of an ICE just the warning: > > Same with curent 4.8 trunk: > > dynamic_dispatch_6.f03:66:0: note: Skipping target new_periodic_5th_order > with mismatching types for icall > u => field_creator%create() With 4.8.2 and 4.9 trunk this only happens with -O0.
This PR seems fixed for 4.9.3, 5.3.0, and trunk (6.0). The change occurred between revisions r201916 (2013-08-22, broken) and r202111 (2013-08-30). Could someone checks that the PR is actually fixed?
> This PR seems fixed for 4.9.3, 5.3.0, and trunk (6.0). The change occurred > between revisions r201916 (2013-08-22, broken) and r202111 (2013-08-30). > Could someone checks that the PR is actually fixed? PING! Is anybody familiar with gov testing?
Created attachment 37938 [details] Proposed test
Author: dominiq Date: Sun Mar 13 09:48:20 2016 New Revision: 234168 URL: https://gcc.gnu.org/viewcvs?rev=234168&root=gcc&view=rev Log: 2016-03-13 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/45076 gfortran.dg/prof/prof.exp: New script. gfortran.dg/prof/dynamic_dispatch_6.f03: New test. Added: trunk/gcc/testsuite/gfortran.dg/prof/ trunk/gcc/testsuite/gfortran.dg/prof/dynamic_dispatch_6.f03 trunk/gcc/testsuite/gfortran.dg/prof/prof.exp Modified: trunk/gcc/testsuite/ChangeLog
Author: dominiq Date: Sun Mar 13 23:22:15 2016 New Revision: 234172 URL: https://gcc.gnu.org/viewcvs?rev=234172&root=gcc&view=rev Log: 2016-03-13 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/45076 gfortran.dg/prof/prof.exp: New script. gfortran.dg/prof/dynamic_dispatch_6.f03: New test. Added: branches/gcc-5-branch/gcc/testsuite/gfortran.dg/prof/ branches/gcc-5-branch/gcc/testsuite/gfortran.dg/prof/dynamic_dispatch_6.f03 branches/gcc-5-branch/gcc/testsuite/gfortran.dg/prof/prof.exp Modified: branches/gcc-5-branch/gcc/testsuite/ChangeLog
Author: dominiq Date: Mon Mar 14 09:21:32 2016 New Revision: 234178 URL: https://gcc.gnu.org/viewcvs?rev=234178&root=gcc&view=rev Log: 2016-03-13 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/45076 gfortran.dg/prof/prof.exp: New script. gfortran.dg/prof/dynamic_dispatch_6.f03: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/prof/ branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/prof/dynamic_dispatch_6.f03 branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/prof/prof.exp Modified: branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
Test committed to the trunk and the gcc 4.9 and 5 branches. Closing as FIXED.
Author: meissner Date: Mon Mar 14 18:18:45 2016 New Revision: 234188 URL: https://gcc.gnu.org/viewcvs?rev=234188&root=gcc&view=rev Log: [gcc] 2016-03-14 Michael Meissner <meissner@linux.vnet.ibm.com> Backport from mainline 2016-03-11 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/70131 * config/rs6000/rs6000.md (round32<mode>2_fprs): Do not do the optimization if we have direct move. (roundu32<mode>2_fprs): Likewise. 2016-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Backport from mainline 2016-03-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR target/62281 * config/i386/sol2.h (STACK_REALIGN_DEFAULT): Define. 2016-03-10 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> PR target/70168 * config/rs6000/rs6000.c (rs6000_expand_atomic_compare_and_swap): Handle overlapping retval and newval. [gcc/testsuite] 2016-03-14 Michael Meissner <meissner@linux.vnet.ibm.com> Backport from mainline 2016-03-11 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/70131 * gcc.target/powerpc/ppc-round2.c: New test. 2016-03-14 Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/45076 gfortran.dg/prof/prof.exp: New script. gfortran.dg/prof/dynamic_dispatch_6.f03: New test. Added: branches/ibm/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/ppc-round2.c - copied unchanged from r234186, branches/gcc-5-branch/gcc/testsuite/gcc.target/powerpc/ppc-round2.c branches/ibm/gcc-5-branch/gcc/testsuite/gfortran.dg/prof/ - copied from r234186, branches/gcc-5-branch/gcc/testsuite/gfortran.dg/prof/ Modified: branches/ibm/gcc-5-branch/gcc/ChangeLog branches/ibm/gcc-5-branch/gcc/DATESTAMP branches/ibm/gcc-5-branch/gcc/config/i386/sol2.h branches/ibm/gcc-5-branch/gcc/config/rs6000/rs6000.c branches/ibm/gcc-5-branch/gcc/config/rs6000/rs6000.md branches/ibm/gcc-5-branch/gcc/testsuite/ChangeLog