Cannot compile code with debug symbols

I have a source code file that will not compile with debug symbols. I get an assertion failed in file ../src/regman/regman_local.cc at line 5224. The compile command and output are below.

/opt/SUNWspro/bin/cc -g -xarch=v9b -xopenmp=noopt -xc99=all -c-o output/spirecon.o spirecon.c

cg: assertion failed in file ../src/regman/regman_local.cc at line 5224

cg: Out of range

cg: 1 errors

cc: cg failed for spirecon.c

However without the debug options and using the default -fast switch, i.e.

/opt/SUNWspro/bin/cc -fast -xarch=v9b -xopenmp=noopt -xc99=all -c-o output/spirecon.o spirecon.c

it compiles without any problems.

I was hoping someone might have a suggestion as to how what might cause this type of error.

[771 byte] By [mklassen] at [2007-11-26 10:06:58]
# 1
Which version of the compiler are you using?
ChrisQuenelle at 2007-7-7 1:46:27 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
I'm using the lastest version of compiler/opt/SUNWspro/bin/cc -Vcc: Sun C 5.8 Patch 121015-02 2006/03/29
mklassen at 2007-7-7 1:46:27 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
You have probably hit a compiler bug. Could you please file this bug through the web interface at http://bugs.sun.com/services/bugreport/submit_intro.do ? After SPARC backend engineers evaluate the problem, they might be able to suggest a workaround.Thanks,Boris
Boris_Ivanovsky at 2007-7-7 1:46:27 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

I have been told this is bugid: 4420630

It only happens when you try to use the optimizing

backend code generator without any optimization.

(That's what -xopenmp=noopt does)

If you add an -xO1 flag the assertion should go away, but you

will also lose some (but not all) of your debuggability.

--chris

ChrisQuenelle at 2007-7-7 1:46:27 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5
Thank-you for your assistance. I've now got my project compiling with debug symbols.-mklassen
mklassen at 2007-7-7 1:46:27 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 6
I am a backend engineer currently trying to resolve this issue in the compiler. Will you be able to provide me with that source file (spirecon.c), which caused that assertion failure?Thanks-Ghassan
ghassan at 2007-7-7 1:46:27 > top of Java-index,Development Tools,Solaris and Linux Development Tools...