Bug 1344717

Summary: gcc-6.1 fails to compile ARM c-code using __attribute__ ((interrupt ("IRQ"))), combined with calling a function
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: davejohansen, jakub, jwakely, law, mpolacek, pbrobinson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-6.1.1-3.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-26 20:54:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Simplified c-code to trigger the problem none

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.