Bug 240772
Summary: | gcc-3.2.3 i386 can not bootstrap gcc-4.2.0, gcc-3.4.6 can | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Tru Huynh <pasteur> |
Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED WONTFIX | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.8 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-05-30 12:21:25 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tru Huynh
2007-05-21 15:57:01 UTC
Some places in i386.c are miscompiled by gcc 3.2.x with -O0 -fkeep-inline-functions, e.g. typedef struct rtx_def *rtx; enum machine_mode { VOIDmode = 0, DImode = 13 }; extern rtx gen_rtx_CONST_INT (enum machine_mode, long); extern rtx gen_x86_shld_1 (rtx, rtx, rtx); static __inline__ rtx gen_x86_64_shld(rtx a, rtx b, rtx c) { return 0; } extern rtx emit_insn (rtx); void foo (rtx *high, rtx *low, enum machine_mode mode, int count) { emit_insn ((mode == DImode ? gen_x86_shld_1 : gen_x86_64_shld) (high[0], low[0], gen_rtx_CONST_INT (VOIDmode, count))); } will unconditionally call gen_x86_64_shld, no matter what mode contains. Removing -fkeep-inline-functions or compiling with optimizations cures this. Will investigate more, that said, this was reported too late to be fixed in RHEL3.9's gcc and it might be a good idea to workaround this in gcc 4.2+ anyway. Further details in the upstream PR. This will be worked around in GCC 4.2.1/4.3+, it is too late to fix this in RHEL3.9 and the bug isn't severe enough to warrant an asynchronous gcc errata, so closing as WONTFIX. http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&r1=1.287&r2=1.288 ought to fix the problem. |