[Bug inline-asm/78487] asm cpuid code and -fgcse crashes

2016-11-23 Thread s-beyer at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78487 Stephan Beyer changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug inline-asm/78487] asm cpuid code and -fgcse crashes

2016-11-23 Thread s-beyer at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78487 --- Comment #5 from Stephan Beyer --- It crashes on run-time. I have absolutely no experience using extended asm syntax but I guess g++ relies on the constraints for its optimization, so I guess the constraints are wrong. I will port the code

[Bug inline-asm/78487] asm cpuid code and -fgcse crashes

2016-11-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78487 --- Comment #4 from Andrew Pinski --- Also I doubt this code is correct.

[Bug inline-asm/78487] asm cpuid code and -fgcse crashes

2016-11-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78487 --- Comment #3 from Andrew Pinski --- Crashes at runtime or crashes inside GCC?

[Bug inline-asm/78487] asm cpuid code and -fgcse crashes

2016-11-22 Thread s-beyer at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78487 --- Comment #2 from Stephan Beyer --- The following problem is only reproducible on one machine. I cannot reproduce it on any other machine. When compiling the attached C++ source file with g++ -O1 -fgcse, it crashes at the third cpuid call

[Bug inline-asm/78487] asm cpuid code and -fgcse crashes

2016-11-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78487 --- Comment #1 from Andrew Pinski --- What is the error message which you are getting? Here is how GCC's cpuid.h header look like for cpuid: #define __cpuid(level, a, b, c, d) \ __asm__ ("cpuid\n\t"