Bug 1344717 - gcc-6.1 fails to compile ARM c-code using __attribute__ ((interrupt ("IRQ"))), combined with calling a function
Summary: gcc-6.1 fails to compile ARM c-code using __attribute__ ((interrupt ("IRQ")))...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-10 13:35 UTC by Hans de Goede
Modified: 2016-06-26 20:54 UTC (History)
6 users (show)

Fixed In Version: gcc-6.1.1-3.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-26 20:54:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Simplified c-code to trigger the problem (165 bytes, text/plain)
2016-06-10 13:35 UTC, Hans de Goede
no flags Details

Description Hans de Goede 2016-06-10 13:35:12 UTC
Created attachment 1166643 [details]
Simplified c-code to trigger the problem

[hans@shalem ~]$ arm-linux-gnu-gcc -march=armv7-a -Os --save-temps -o foo -c foo.c
foo.s: Assembler messages:
foo.s:49: Error: push/pop do not support {reglist}^ -- `pop {r0,r1,r2,r3,ip,pc}^'

Also reproduced on arm hardware with latest F24 gcc pkgs

I'll attach foo.c, which is a simplified piece of c-code to reproduce this problem (this gets triggered when compiling u-boot with recent changes).

Comment 1 Hans de Goede 2016-06-13 09:46:47 UTC
Here is a reaction to this bug from the u-boot mailinglist (which may or may-not be helpful:

"Interesting. Seems like the compiler should be emitting LDMFD instead
of POP, or a POP followed by a SUBS/MOVS."

Comment 2 Peter Robinson 2016-06-13 12:12:33 UTC
Looks like this upstream bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70830

Comment 3 Hans de Goede 2016-06-13 15:37:14 UTC
Hi,

(In reply to Peter Robinson from comment #2)
> Looks like this upstream bug
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70830

Yes it indeed is that bug, thanks for finding that. I've done a local cross-gcc build with the patches from that bug applied and that fixes things.

Jakub, can we get this into Fedora, at least in rawhide ? The next upstream u-boot release will need to have this fixed to build.

Regards,

Hans

Comment 4 Jakub Jelinek 2016-06-13 15:44:01 UTC
There are many fixes on the current gcc-6-branch, but as due to F24 release right now there is almost zero chance to get it in, I'm deferring next update until F24 goes gold, so hopefully till next week.  There are various fixes I need to backport from trunk to 6.x branch before doing such update.

Comment 5 Hans de Goede 2016-06-13 15:46:59 UTC
Hi,

(In reply to Jakub Jelinek from comment #4)
> There are many fixes on the current gcc-6-branch, but as due to F24 release
> right now there is almost zero chance to get it in, I'm deferring next
> update until F24 goes gold, so hopefully till next week.  There are various
> fixes I need to backport from trunk to 6.x branch before doing such update.

Ok, that is good to know. There is no hurry here, just making sure things don't break when we try to get u-boot v2016.07 (to be released) into Fedora.

Thanks for all the great work you do on gcc!

Regards,

Hans

Comment 6 Peter Robinson 2016-06-20 10:59:10 UTC
(In reply to Jakub Jelinek from comment #4)
> There are many fixes on the current gcc-6-branch, but as due to F24 release
> right now there is almost zero chance to get it in, I'm deferring next
> update until F24 goes gold, so hopefully till next week.  There are various
> fixes I need to backport from trunk to 6.x branch before doing such update.

So F-24 is now gold, goes out tomorrow, everything signed off etc so you should be fine to move forward with this now

Comment 7 Fedora Update System 2016-06-24 18:56:08 UTC
gcc-6.1.1-3.fc24 gcc-python-plugin-0.15-6.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-6db2423f35

Comment 8 Fedora Update System 2016-06-26 00:27:03 UTC
gcc-6.1.1-3.fc24, gcc-python-plugin-0.15-6.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-6db2423f35

Comment 9 Fedora Update System 2016-06-26 20:54:13 UTC
gcc-6.1.1-3.fc24, gcc-python-plugin-0.15-6.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.