This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch to compile gcc-4.3.1 on Solaris 9 with Sun Studio 11


When trying to compile gcc-4.3.1 using Sun Studio 11 on Solaris 9 I received the following compilation errors for fixed-value.c and tree-ssa-loop-ivopts.c:

cc -c   -g -DIN_GCC     -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.3.1/gcc
-I../../gcc-4.3.1/gcc/. -I../../gcc-4.3.1/gcc/../include
-I../../gcc-4.3.1/gcc/../libcpp/include -I/usr/local/include/gmp64
-I/usr/local/include -I../../gcc-4.3.1/gcc/../libdecnumber
-I../../gcc-4.3.1/gcc/../libdecnumber/dpd -I../libdecnumber
-I/usr/local/include   ../../gcc-4.3.1/gcc/fixed-value.c -o fixed-value.o
"../../gcc-4.3.1/gcc/fixed-value.c", line 294: operands have incompatible
types:
         struct  {unsigned long long low, long long high} ":" const struct
{unsigned long long low, long long high}
cc: acomp failed for ../../gcc-4.3.1/gcc/fixed-value.c

and

cc -c -g -DIN_GCC -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.3.1/gcc
-I../../gcc-4.3.1/gcc/. -I../../gcc-4.3.1/gcc/../include
-I../../gcc-4.3.1/gcc/../libcpp/include -I/usr/local/include/gmp64
-I/usr/local/include -I../../gcc-4.3.1/gcc/../libdecnumber
-I../../gcc-4.3.1/gcc/../libdecnumber/dpd -I../libdecnumber
-I/usr/local/include ../../gcc-4.3.1/gcc/tree-ssa-loop-manip.c -o
tree-ssa-loop-manip.o
"../../gcc-4.3.1/gcc/tree-ssa-loop-ivopts.c", line 4276: operands have
incompatible types:
const struct {unsigned int cost, unsigned int complexity} ":" struct {unsigned int cost, unsigned int complexity}
cc: acomp failed for ../../gcc-4.3.1/gcc/tree-ssa-loop-ivopts.c


In both cases this seems to be occurring because Sun Studio 11 does not like the types of the operands in the conditional expression. I wrote a patch which just converts the conditional expression to the equivalent if/else block with assignment statements. The compiler had no complaints about this. I have posted this bug as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37122
but it seems that this is possibly a bug in Sun Studio 11. The patches are attached for anyone with the same issues. I will also be sending this issue to Sun.


Dave Diffenbaugh
Open System Solutions
Rutgers University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]