[Bug c/91232] Adding -fPIC with optimization level > 0 resulting a busy hang in my program

2019-07-23 Thread bharath.appali at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91232 --- Comment #9 from bharath appali --- (In reply to Richard Biener from comment #5) > It's the 0 - src computation that invokes undefined behavior and things go > downhill from there. Use 0 - (uint32_t)src here. Can I please have any pointers w

[Bug c/91232] Adding -fPIC with optimization level > 0 resulting a busy hang in my program

2019-07-23 Thread bharath.appali at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91232 --- Comment #8 from bharath appali --- ** It solved the issue

[Bug c/91232] Adding -fPIC with optimization level > 0 resulting a busy hang in my program

2019-07-23 Thread bharath.appali at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91232 --- Comment #7 from bharath appali --- Thanks @ Richard Biener I solved the issue.

[Bug c/91232] Adding -fPIC with optimization level > 0 resulting a busy hang in my program

2019-07-23 Thread bharath.appali at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91232 --- Comment #6 from bharath appali --- Thanks for pointing @ Andreas Schwab I have tried with `-fno-strict-aliasing`

[Bug c/91232] Adding -fPIC with optimization level > 0 resulting a busy hang in my program

2019-07-23 Thread bharath.appali at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91232 --- Comment #3 from bharath appali --- `-fwrapv` solved the issue. With earlier version of compilers i haven't found this issue.

[Bug c/91232] Adding -fPIC with optimization level > 0 resulting a busy hang in my program

2019-07-23 Thread bharath.appali at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91232 --- Comment #2 from bharath appali --- Thanks @ Andrew Pinski, will try that. I tried adding `__attribute__((noinline))` to the function `getMostSignificantBit` which solved the problem.

[Bug c/91232] New: Adding -fPIC with optimization level > 0 resulting a busy hang in my program

2019-07-23 Thread bharath.appali at gmail dot com
ity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: bharath.appali at gmail dot com Target Milestone: --- Created attachment 46622 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46622&action=edit Untar the atta