public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/37122]  New: fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types
@ 2008-08-14 15:55 davediff at nbcs dot rutgers dot edu
  2008-08-14 15:56 ` [Bug bootstrap/37122] " davediff at nbcs dot rutgers dot edu
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: davediff at nbcs dot rutgers dot edu @ 2008-08-14 15:55 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/37122] fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types
  2008-08-14 15:55 [Bug bootstrap/37122] New: fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types davediff at nbcs dot rutgers dot edu
  2008-08-14 15:56 ` [Bug bootstrap/37122] " davediff at nbcs dot rutgers dot edu
@ 2008-08-14 15:56 ` davediff at nbcs dot rutgers dot edu
  2008-08-16 22:48 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: davediff at nbcs dot rutgers dot edu @ 2008-08-14 15:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from davediff at nbcs dot rutgers dot edu  2008-08-14 15:54 -------
Created an attachment (id=16072)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16072&action=view)
patch to fix fixed-value.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37122


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/37122] fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types
  2008-08-14 15:55 [Bug bootstrap/37122] New: fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types davediff at nbcs dot rutgers dot edu
@ 2008-08-14 15:56 ` davediff at nbcs dot rutgers dot edu
  2008-08-14 15:56 ` davediff at nbcs dot rutgers dot edu
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: davediff at nbcs dot rutgers dot edu @ 2008-08-14 15:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from davediff at nbcs dot rutgers dot edu  2008-08-14 15:55 -------
Created an attachment (id=16073)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16073&action=view)
patch to fix tree-ssa-loop-ivopts.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37122


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/37122] fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types
  2008-08-14 15:55 [Bug bootstrap/37122] New: fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types davediff at nbcs dot rutgers dot edu
  2008-08-14 15:56 ` [Bug bootstrap/37122] " davediff at nbcs dot rutgers dot edu
  2008-08-14 15:56 ` davediff at nbcs dot rutgers dot edu
@ 2008-08-16 22:48 ` pinskia at gcc dot gnu dot org
  2008-09-03 13:30 ` davediff at nbcs dot rutgers dot edu
  2008-09-12  7:07 ` ghazi at gcc dot gnu dot org
  4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-16 22:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-08-16 22:47 -------
This seems like a bug in Sun's compiler.  As far as I can tell a ? const struct
A : struct A should be valid in C and C++.  I think you should both post the
patches to gcc-patches@ and make sure you file a bug with Sun too.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37122


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/37122] fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types
  2008-08-14 15:55 [Bug bootstrap/37122] New: fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types davediff at nbcs dot rutgers dot edu
                   ` (2 preceding siblings ...)
  2008-08-16 22:48 ` pinskia at gcc dot gnu dot org
@ 2008-09-03 13:30 ` davediff at nbcs dot rutgers dot edu
  2008-09-12  7:07 ` ghazi at gcc dot gnu dot org
  4 siblings, 0 replies; 7+ messages in thread
From: davediff at nbcs dot rutgers dot edu @ 2008-09-03 13:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from davediff at nbcs dot rutgers dot edu  2008-09-03 13:28 -------
Yes, your right it is a bug in Sun's Compiler. For those interested it is bug
ID: 6406892. The sun patch that fixes this bug is 121015-06 available here:
http://sunsolve.sun.com/show.do?target=patchpage


-- 

davediff at nbcs dot rutgers dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37122


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/37122] fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types
  2008-08-14 15:55 [Bug bootstrap/37122] New: fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types davediff at nbcs dot rutgers dot edu
                   ` (3 preceding siblings ...)
  2008-09-03 13:30 ` davediff at nbcs dot rutgers dot edu
@ 2008-09-12  7:07 ` ghazi at gcc dot gnu dot org
  4 siblings, 0 replies; 7+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2008-09-12  7:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ghazi at gcc dot gnu dot org  2008-09-12 07:06 -------
(In reply to comment #4)
> Yes, your right it is a bug in Sun's Compiler. For those interested it is bug
> ID: 6406892. The sun patch that fixes this bug is 121015-06 available here:
> http://sunsolve.sun.com/show.do?target=patchpage

I believe 121015-06 is the sparc series.  There is also an x86 variant numbered
121016-07 that fixes the same bugid.  IMHO these patches should be listed in
the solaris-specific installtion instructions here:
http://gcc.gnu.org/install/specific.html#x-x-solaris2
as are the other required solaris patches.

David, would you consider posting a patch for gcc/doc/install.texi ?
Please CC: me if you do so.  Thanks!


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37122


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug bootstrap/37122] fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types
       [not found] <bug-37122-4@http.gcc.gnu.org/bugzilla/>
@ 2012-05-11 19:22 ` skunk at iskunk dot org
  0 siblings, 0 replies; 7+ messages in thread
From: skunk at iskunk dot org @ 2012-05-11 19:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37122

--- Comment #6 from Daniel Richard G. <skunk at iskunk dot org> 2012-05-11 19:16:50 UTC ---
Created attachment 27383
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27383
updated patch for 4.7.0

I got bitten by this recently. Bootstrapping GCC 4.7.0 on Solaris 8:

[...]
cc -xarch=v9 -xildoff -c   -g -DIN_GCC    -DHAVE_CONFIG_H -I. -I.
-I/home/src/gcc-4.7.0/gcc -I/home/src/gcc-4.7.0/gcc/.
-I/home/src/gcc-4.7.0/gcc/../include
-I/home/src/gcc-4.7.0/gcc/../libcpp/include -I/tg/freeport/arch/sunos64/include
-I/tg/freeport/arch/sunos64/include -I/tg/freeport/arch/sunos64/include 
-I/home/src/gcc-4.7.0/gcc/../libdecnumber
-I/home/src/gcc-4.7.0/gcc/../libdecnumber/dpd -I../libdecnumber   
/home/src/gcc-4.7.0/gcc/tree-ssa-loop-ivopts.c -o tree-ssa-loop-ivopts.o
"/home/src/gcc-4.7.0/gcc/tree-ssa-loop-ivopts.c", line 6047: operands have
incompatible types:
     struct  {int cost, unsigned int complexity} ":" const struct  {int cost,
unsigned int complexity}
"/home/src/gcc-4.7.0/gcc/tree-ssa-loop-ivopts.c", line 6048: operands have
incompatible types:
     struct  {int cost, unsigned int complexity} ":" const struct  {int cost,
unsigned int complexity}
cc: acomp failed for /home/src/gcc-4.7.0/gcc/tree-ssa-loop-ivopts.c
gmake[3]: *** [tree-ssa-loop-ivopts.o] Error 2
gmake[3]: Leaving directory `/tmp/gcc-build/gcc'
gmake[2]: *** [all-stage1-gcc] Error 2
gmake[2]: Leaving directory `/tmp/gcc-build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/tmp/gcc-build'
gmake: *** [bootstrap-lean] Error 2


I'd love to patch the compiler, but Oracle won't let me do that unless I give
them a fat wad of money. David's patch to the source is no longer applicable to
4.7.0, so I'm attaching an update.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-11 19:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-14 15:55 [Bug bootstrap/37122] New: fixed-value.c and tree-ssa-loop-ivopts.c won't compile with Sun Studio 11 on Solaris 9 due to incompatible operand types davediff at nbcs dot rutgers dot edu
2008-08-14 15:56 ` [Bug bootstrap/37122] " davediff at nbcs dot rutgers dot edu
2008-08-14 15:56 ` davediff at nbcs dot rutgers dot edu
2008-08-16 22:48 ` pinskia at gcc dot gnu dot org
2008-09-03 13:30 ` davediff at nbcs dot rutgers dot edu
2008-09-12  7:07 ` ghazi at gcc dot gnu dot org
     [not found] <bug-37122-4@http.gcc.gnu.org/bugzilla/>
2012-05-11 19:22 ` skunk at iskunk dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).