[Bug target/77669] Incorrect LTO code on embedded ARM

2016-09-21 Thread wgh at beyondunreal dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77669

wgh at beyondunreal dot com changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from wgh at beyondunreal dot com ---
I've carefully analyzed the assembly code, and different constructor order was
indeed the case. Thank you for your help.

[Bug target/77669] Incorrect LTO code on embedded ARM

2016-09-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77669

Richard Biener  changed:

   What|Removed |Added

   Keywords||lto
 Target||arm
 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-09-21
 Ever confirmed|0   |1

--- Comment #3 from Richard Biener  ---
Unless you can provide a complete testcase that compiles to sth executable it's
not possible to help you in debugging this.

LTO may cause static variable constructors to run in a different order than
when not using LTO (but they still behave according to the language rules
which basically make ordering unspecififed AFAIR).

[Bug target/77669] Incorrect LTO code on embedded ARM

2016-09-20 Thread wgh at beyondunreal dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77669

--- Comment #2 from wgh at beyondunreal dot com ---
It looks like LTO somehow breaks constructors for static variables. I have no
better idea ATM.