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. The only other thing needed to complete the compilation of gcc-4.3.1 using Sun Studio 11 on Solaris 9 was the two patches from bug # 33304 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33304 -- Summary: fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: davediff at nbcs dot rutgers dot edu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37122