ube assertion with -O in Studio11 after backend Patch 120759-05 2006/04/27

I'm running into an assertion thrown by ube after upgrading my Studio11 backend Patch

120759-04 to latest 120759-05. I'm usually compiling with -O (i.e. -xO3), but even lower levels of optimization raise this ube assertion, e.g. -xO1

CC -o myfile.o -xO1 -KPIC -xarch=generic64 -c -I../../include myfile.cpp -v 2>&1 | grep ube

/opt/SUNWspro/prod/bin/ube -verbose -PIC -fstore -O1 -fbe /opt/SUNWspro/prod/bin/fbe -xarch=generic64 -xchip=generic -xcache=generic -comdat -o myfile.o /tmp/ir2hf.03668.3.o

[b]ube: error: Assert has been violated at '/export/home1/train_builds/venus_patch/build.0427/intel-S2/lang/ube/cf/src/tv. c 473'.

[/b]

Compiling in lower optimization levels than -xO1 hides the problem.

Stepping back to previous patch version (120759-04 2006/03/13) immediately fixes the assertion problem.

The system is a Dual Opteron (Sun Fire V20z) w/ 2GB RAM running Solaris 10.

Latest OS and compiler patches are installed.

# uname -a

SunOS v20 5.10 Generic_Patch_118844-30 i86pc i386 i86pc

# CC -V

CC: Sun C++ 5.8 Patch 121018-02 2006/04/26

I can post more details if required.

[1187 byte] By [jroemmler] at [2007-11-26 7:48:23]
# 1
Could you please produce a preprocessed file (using your compilation line and -E) and send it to Boris dot Ivanovsky at Sun dot com? It will allow us to identify the problem.Thanks in advance,Boris
Boris_Ivanovsky at 2007-7-6 20:03:45 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
Looks like a known bug which was fixed in development version of studio.Perhaps it just missing in 120759-05 patch; next backend patch should fixthis problem
meantraitor at 2007-7-6 20:03:45 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
I've filed CR 6437984 to track this problem. The fix should be available in the upcoming backend patches.Thanks for reporting the problem!Boris
Boris_Ivanovsky at 2007-7-6 20:03:45 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

FYI:

The issue persists in (updated) backend Patch 120759-07.

To reproduce, compile the following minimal C++ code sample:

[code]

$ cat ube_assert.cpp

int main(int, const char**) {

return (int*)0 - (int*)(char*)0;

}

$ CC -o /dev/null -xO1 -c ube_assert.cpp

ube: error: Assert has been violated at '/set/venus_patch/builds.intel-S2/build.0628/intel-S2/lang/ube/cf/src/tv.c 473'.

[/code]

Jochen

jroemmler at 2007-7-6 20:03:45 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5
Hi Jochen,the problem was fixed just recently, and the fix will be available in the upcoming patches (specifically, C++ frontend part).Best regards,Boris
Boris_Ivanovsky at 2007-7-6 20:03:45 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 6
Thanks a ton, Boris.
jroemmler at 2007-7-6 20:03:45 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 7
This bug has been fixed in the development version of the compiler. The fix for it will be available in the upcoming Sun Studio Express releases (I guess SSX3).Best regards,Boris
Boris_Ivanovsky at 2007-7-6 20:03:45 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 8

For the records:

Installing updated patch "120759-12: Sun Studio 11_x86: Sun Compiler Common patch for x86 backend" no longer raises an ube assertion. So I guess the problem is fixed, although I could not find a reference to CR 6437984 in the changelog, but there's a similar promising entry:

6522086 venus_patch: ube: error: Assert has been violated at ube/cf/src/tv.c 466

jroemmler at 2007-7-6 20:03:45 > top of Java-index,Development Tools,Solaris and Linux Development Tools...