Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 679936 - sys-devel/gcc-8.2.0-r6: internal compiler error: in get_hot_bb_threshold, at pr edict.c:135 on armv5tel-softfloat
Summary: sys-devel/gcc-8.2.0-r6: internal compiler error: in get_hot_bb_threshold, at ...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-10 14:06 UTC by Christoph Junghans (RETIRED)
Modified: 2019-11-24 21:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log.bz2,116.72 KB, application/x-bzip)
2019-03-10 14:07 UTC, Christoph Junghans (RETIRED)
Details
gcc-build-logs.tar.bz2 (gcc-build-logs.tar.bz2,264.87 KB, application/x-bzip)
2019-03-10 14:08 UTC, Christoph Junghans (RETIRED)
Details
libgcc2.i (libgcc2.i,212.47 KB, text/plain)
2019-03-10 16:50 UTC, Christoph Junghans (RETIRED)
Details
gcc-8.2.0-ipa-no-inline-PR89009.patch (gcc-8.2.0-ipa-no-inline-PR89009.patch,5.22 KB, patch)
2019-03-12 22:36 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2019-03-10 14:06:01 UTC
sys-devel/gcc-8.2.0-r6 fails to build on my armv5tel-softfloat-linux-gnueabi with:
/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/build/./gcc/ -B/usr/armv5t
el-softfloat-linux-gnueabi/bin/ -B/usr/armv5tel-softfloat-linux-gnueabi/lib/ -isystem /usr/armv5tel-softfloat-linux-gnueabi/include -is
ystem /usr/armv5tel-softfloat-linux-gnueabi/sys-include    -g -O2 -pipe -march=armv5te -O2  -g -O2 -pipe -march=armv5te -DIN_GCC    -W 
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   
-fPIC -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fno-stack-clash-protection   -fPIC -fno-inline -I. -I. -I../.
././gcc -I/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libgcc -I/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libgcc
/. -I/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libgcc/../gcc -I/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libg
cc/../include  -DHAVE_CC_TLS  -o _divdi3.o -MT _divdi3.o -MD -MP -MF _divdi3.dep -DL_divdi3 -c /var/tmp/portage/sys-devel/gcc-8.2.0-r6/
work/gcc-8.2.0/libgcc/libgcc2.c \
  -fexceptions -fvisibility=hidden -DHIDE_EXPORTS
during GIMPLE pass: einline
/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libgcc/libgcc2.c: In function ‘__divdi3’:
/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libgcc/libgcc2.c:1250:1: internal compiler error: in get_hot_bb_threshold, at pr
edict.c:135
 }
 ^
0x5253a7 get_hot_bb_threshold()
        /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/gcc/predict.c:135
0x42139f ipa_propagate_frequency(cgraph_node*)
        /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/gcc/ipa-profile.c:436
0x412b17 inline_update_callee_summaries
        /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/gcc/ipa-fnsummary.c:2862
0x4132cf ipa_merge_fn_summary_after_inlining(cgraph_edge*)
        /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/gcc/ipa-fnsummary.c:3112
0xca513f inline_call(cgraph_edge*, bool, vec<cgraph_edge*, va_heap, vl_ptr>*, int*, bool, bool*)
        /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/gcc/ipa-inline-transform.c:448
0xc9867f inline_always_inline_functions
        /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/gcc/ipa-inline.c:2628
0xc9867f early_inliner(function*)
        /var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/gcc/ipa-inline.c:2724

build.log attached
Comment 1 Christoph Junghans (RETIRED) gentoo-dev 2019-03-10 14:07:38 UTC
Created attachment 568402 [details]
build.log
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2019-03-10 14:08:22 UTC
Created attachment 568404 [details]
gcc-build-logs.tar.bz2
Comment 3 Christoph Junghans (RETIRED) gentoo-dev 2019-03-10 14:09:11 UTC
And I should say sys-devel/gcc-8.3.0 builds fine.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-10 15:00:37 UTC
Is it reproducible? If it is can you extract a self-contained sample following https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide ?
Comment 5 Christoph Junghans (RETIRED) gentoo-dev 2019-03-10 16:48:50 UTC
(In reply to Sergei Trofimovich from comment #4)
> Is it reproducible? If it is can you extract a self-contained sample
> following https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide ?
Yes, it is reproducible! I will attach libgcc2.i.
Comment 6 Christoph Junghans (RETIRED) gentoo-dev 2019-03-10 16:50:04 UTC
Created attachment 568460 [details]
libgcc2.i
Comment 7 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-12 21:59:59 UTC
I tried to reproduce it on the following cross-compilers:
    amd64->armv5tel-softfloat-linux-gnueabi
    x86->armv5tel-softfloat-linux-gnueabi
and did not succeed so far. The test just compiles fine.

Will try a few more options.
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-12 22:35:42 UTC
I see 3 IPA-related backports into 8.3.0:
  2e48cb7168c Backport r268762
    https://github.com/gcc-mirror/gcc/commit/2e48cb7168c
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89009

  Looks related.

  2a5ec34a971     Backport from mainline:         2019-01-05  Jan Hubicka  <hubicka@ucw.cz>
    https://github.com/gcc-mirror/gcc/commit/2a5ec34a971
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86020

  Looks unrelated.

  af2fb015375     Backported from mainline        2019-01-31  Jakub Jelinek  <jakub@redhat.com>
    https://github.com/gcc-mirror/gcc/commit/af2fb015375
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89124

  Looks unrelated.

I wonder if you could try https://github.com/gcc-mirror/gcc/commit/2e48cb7168c on 8.2.0 and see if it helps. I'll attach the patch.
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-12 22:36:05 UTC
Created attachment 568920 [details, diff]
gcc-8.2.0-ipa-no-inline-PR89009.patch
Comment 10 Christoph Junghans (RETIRED) gentoo-dev 2019-03-13 23:49:41 UTC
(In reply to Sergei Trofimovich from comment #9)
> Created attachment 568920 [details, diff] [details, diff]
> gcc-8.2.0-ipa-no-inline-PR89009.patch
 * Applying user patches from /etc/portage/patches/sys-devel/gcc-8.2.0-r6 ...
 *   gcc-8.2.0-ipa-no-inline-PR89009.patch ...
 [ ok ]
...
/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/build/./gcc/ -B/usr/armv5t
el-softfloat-linux-gnueabi/bin/ -B/usr/armv5tel-softfloat-linux-gnueabi/lib/ -isystem /usr/armv5tel-softfloat-linux-gnueabi/include -is
ystem /usr/armv5tel-softfloat-linux-gnueabi/sys-include    -g -O2 -pipe -march=armv5te -O2  -g -O2 -pipe -march=armv5te -DIN_GCC    -W 
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   
-fPIC -fno-inline -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fno-stack-clash-protection   -fPIC -fno-inline -I. -I. -I../.
././gcc -I/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libgcc -I/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libgcc
/. -I/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libgcc/../gcc -I/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libg
cc/../include  -DHAVE_CC_TLS  -o _divdi3.o -MT _divdi3.o -MD -MP -MF _divdi3.dep -DL_divdi3 -c /var/tmp/portage/sys-devel/gcc-8.2.0-r6/
work/gcc-8.2.0/libgcc/libgcc2.c \
  -fexceptions -fvisibility=hidden -DHIDE_EXPORTS
during GIMPLE pass: einline
/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libgcc/libgcc2.c: In function ‘__divdi3’:
/var/tmp/portage/sys-devel/gcc-8.2.0-r6/work/gcc-8.2.0/libgcc/libgcc2.c:1250:1: internal compiler error: in get_hot_bb_threshold, at pr
edict.c:135
 }
 ^

Didn't help!
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-04 20:56:25 UTC
That's unfortunate. Is recently pushed gcc-9.1.0 any better?
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2019-11-24 21:46:05 UTC
Let's close as obsolete as there is no follow-up.