| Summary: | sys-devel/gcc-4.5.0 arm backend builds invalid code with -Os | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Steev Klimaszewski (RETIRED) <steev> |
| Component: | [OLD] GCC Porting | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | arm, armin76, siarhei.siamashka, solar |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | ARM | ||
| OS: | Linux | ||
| URL: | http://gcc.gnu.org/PR43698 | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Steev Klimaszewski (RETIRED)
2010-04-28 05:10:03 UTC
Just a minor clarification. Miscompilation happens with -O2 option too (I confirmed this later, but the initial investigation was done for -Os problem). Most likely any optimizations level is affected for armv6 processors and newer (those which have REV instruction). Now in the 4.5.0 patchset. This needs to be reopened. Gentoo patchset for gcc 4.5.0 got a newer revision of PR43698 fix, which does not solve the problem for some reason: http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00365.html The older patch was is a bit different, and it did the job: http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00401.html the difference I see is -(define_insn "arm_rev" +(define_insn "*arm_rev" Beside that looks the same This is a bit weird. I tried the latest PR43698 patch with 4.5 gcc branch SVN and a manually built crosscompiler, it seems to be fine. Now I'm trying to figure out what went wrong when gcc 4.5.0 was emerged (armin76 also had problems). OK, now everything is clear. The second revision of the patch which got into gentoo patchset is really not a good one, it does not work right. There is actually *another* different revision of the fix which was finally committed to gcc trunk today (and it seems to be working fine): http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43698#c13 Can PR43698 fix be replaced with the final version in the gentoo 4.5.0 patchset? Fixed in p1.4. |