This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/11203] source doesn't compile with -O0 but they compile with -O3
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jan 2005 12:14:32 -0000
- Subject: [Bug inline-asm/11203] source doesn't compile with -O0 but they compile with -O3
- References: <20030616070732.11203.spigel@olvs.miee.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2005-01-22 12:14 -------
Martin, you should realize that this problem *cannot* be solved. Yes,
there will perhaps be a time when this particular test case compiles,
though I think that is unlikely. But anyway, then there will be other
cases that fail.
The reason is dead simple: register allocation is NP-complete, so it
is even *theoretically* not possible to write register allocators that
always find a coloring. That means any register allocator will always
fail on some very constrained asm input. And you cannot allow it to
run indefinitely until a coloring is found, because then you've turned
the graph coloring problem into the halting problem because you can't
prove that a coloring exists and that the register allocator algorithm
will terminate.
So really it doesn't matter at all whether or not your specific inline
asm compiles or not. When yours does, someone else's will fail.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203