Bug 88650 - [9 Regression] ICE in set_even_probabilities at gcc/predict.c:885 since r267485
Summary: [9 Regression] ICE in set_even_probabilities at gcc/predict.c:885 since r267485
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 9.0
: P3 normal
Target Milestone: 9.0
Assignee: Martin Liška
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2019-01-02 07:45 UTC by Martin Liška
Modified: 2019-01-02 14:06 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2019-01-02 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2019-01-02 07:45:24 UTC
Caused by my commit:

$ gcc /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/transfer_simplify_1.f90 -fno-tree-fre -fno-tree-ccp -Og
during GIMPLE pass: profile_estimate
/home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/transfer_simplify_1.f90:15:0:

   15 |   call pr31427 ()
      | 
internal compiler error: Floating point exception
0xb3bd2f crash_signal
	/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/toplev.c:326
0x7ffff6bc310f ???
	/usr/src/debug/glibc-2.27-6.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x96966a safe_scale_64bit(unsigned long, unsigned long, unsigned long, unsigned long*)
	/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/profile-count.h:81
0x96966a profile_probability::apply_scale(long, long) const
	/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/profile-count.h:497
0x96966a profile_probability::apply_scale(long, long) const
	/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/profile-count.h:489
0xa955d4 set_even_probabilities
	/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/predict.c:885
0xa99f30 combine_predictions_for_bb
	/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/predict.c:1237
0xa9a2e9 tree_estimate_probability(bool)
	/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/predict.c:3091
0xa9a677 execute
	/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/predict.c:4028
0xa9a677 execute
	/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-x86_64/build/gcc/predict.c:4011
Comment 1 Martin Liška 2019-01-02 07:46:05 UTC
Mine.
Comment 2 Martin Liška 2019-01-02 14:04:24 UTC
Author: marxin
Date: Wed Jan  2 14:03:53 2019
New Revision: 267513

URL: https://gcc.gnu.org/viewcvs?rev=267513&root=gcc&view=rev
Log:
Calculate prediction remainder at proper place (PR tree-optimization/88650).

2019-01-02  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/88650
	* predict.c (set_even_probabilities): Calculate probability
	remainer only when really used.
2019-01-02  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/88650
	* gfortran.dg/predict-3.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/predict-3.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/predict.c
    trunk/gcc/testsuite/ChangeLog
Comment 3 Martin Liška 2019-01-02 14:06:23 UTC
Fixed.