#3402 closed defect (fixed)
Fix GCC 5.x issues so that it can be used in Windows
Reported by: | Adrian Pop | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | high | Milestone: | 1.11.0 |
Component: | Build Environment | Version: | trunk |
Keywords: | Cc: |
Description
There are some tests failing when using GCC 5.x:
https://test.openmodelica.org/hudson/job/OpenModelica_TEST_GCC_5/lastCompletedBuild/testReport/
These should be fixed before we update OMDev to msys2 which uses GCC 5.2.
Change History (17)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
comment:3 by , 9 years ago
So is one of these that needs to be disabled (or a combination) for Matching.mo:
-fthread-jumps -falign-functions -falign-jumps -falign-loops -falign-labels -fcaller-saves -fcrossjumping -fcse-follow-jumps -fcse-skip-blocks -fdelete-null-pointer-checks -fdevirtualize -fdevirtualize-speculatively -fexpensive-optimizations -fgcse -fgcse-lm -fhoist-adjacent-loads -finline-small-functions -findirect-inlining -fipa-cp -fipa-cp-alignment -fipa-sra -fipa-icf -fisolate-erroneous-paths-dereference -flra-remat -foptimize-sibling-calls -foptimize-strlen -fpartial-inlining -fpeephole2 -freorder-blocks -freorder-blocks-and-partition -freorder-functions -frerun-cse-after-loop -fsched-interblock -fsched-spec -fschedule-insns -fschedule-insns2 -fstrict-aliasing -fstrict-overflow -ftree-builtin-call-dce -ftree-switch-conversion -ftree-tail-merge -ftree-pre -ftree-vrp -fipa-ra
Anybody wants to hazard a guess? :)
comment:4 by , 9 years ago
The diffs between GCC 4.9.3 and GCC 5.2.0 with regards to -O2 optimizations are:
-
.txt
old new 11 11 -fhoist-adjacent-loads 12 12 -finline-small-functions 13 13 -findirect-inlining 14 -fipa-cp 15 -fipa-cp-alignment 14 16 -fipa-sra 17 -fipa-icf 15 18 -fisolate-erroneous-paths-dereference 19 -flra-remat 16 20 -foptimize-sibling-calls 21 -foptimize-strlen 17 22 -fpartial-inlining 18 23 -fpeephole2 19 24 -freorder-blocks -freorder-functions 25 -freorder-blocks-and-partition 20 26 -frerun-cse-after-loop 21 27 -fsched-interblock -fsched-spec 22 28 -fschedule-insns -fschedule-insns2 23 29 -fstrict-aliasing -fstrict-overflow 30 -ftree-builtin-call-dce 24 31 -ftree-switch-conversion -ftree-tail-merge 25 32 -ftree-pre 26 33 -ftree-vrp 34 -fipa-ra
So maybe one of the new ones are buggy :)
comment:5 by , 9 years ago
If it's only Matching.mo, it is possible to script it. I could try in the afternoon when I am less busy, if you'd like me to.
comment:6 by , 9 years ago
I have tried the omc with Matching.mo compiled with -O1 just on one model: testsuite/simulation/modelica/built_in_functions/DummyDerMatching.mo so I'm not 100% sure it will work on all the affected ones.
comment:7 by , 9 years ago
I've gone through all of those optimization, and -O1 -f$opt
works for all of them. It must be a combination. Is this list of -O2 optimizations a complete list of GCC 5.2.0 -O2 optimization? Because -O1 -fALLOFTHEM... also works.
comment:8 by , 9 years ago
Yes, I've copied them from here and did the diff:
GCC 5.2.0:
https://gcc.gnu.org/onlinedocs/gcc-5.2.0/gcc/Optimize-Options.html#Optimize-Options
GCC 4.9.3:
https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gcc/Optimize-Options.html#Optimize-Options
comment:9 by , 9 years ago
Partial fix in 97de296: It was an -O1 flag that was marking function calls pure that was the culprit. GCC 5.1 will still be broken, but 5.2 seems to work (for C code, the tests use g++-4.9 for the cppruntime since boost breaks in g++-5.2).
comment:14 by , 8 years ago
Milestone: | 1.11.0 → 1.12.0 |
---|
Milestone moved to 1.12.0 due to 1.11.0 already being released.
comment:15 by , 7 years ago
Milestone: | 1.12.0 → Future |
---|
The milestone of this ticket has been reassigned to "Future".
If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.
If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".
In both cases, a short informative comment would be welcome.
comment:16 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:17 by , 7 years ago
Milestone: | Future → 1.11.0 |
---|
Update: seems that if you compile Matching.mo with -O1 it works fine.