public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11190] New: ICE in output_operand (wrong address) with static and -fPIC
@ 2003-06-13 23:48 eager@mvista.com
  2003-06-14  0:05 ` [Bug c++/11190] " bangerth@dealii.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: eager@mvista.com @ 2003-06-13 23:48 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: ICE in output_operand (wrong address) with static and -
                    fPIC
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: eager@mvista.com
                CC: gcc-bugs@gcc.gnu.org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-hardhat-linux

I compile the attached test case with G++ 3.2.2 specifying -fPIC:

  g++ -fPIC x.cpp -o x

the following error is generated:

  x.cpp: In function `int ListNextX()':
  x.cpp:19: output_operand: Wrong address expression or operand constraint

The error appears to occur when code for the structure assignment
on line 16 is being generated.  The messages is actually generated by 
print_operand_address() in i386.c.  The rtx node that it fails on is 

(plus:SI (mem:SI (plus:SI (reg/f:SI 6 ebp)
            (const_int -1344 [0xfffffac0])) [0 S4 A8])
    (const:SI (unspec:SI[ 
                (symbol_ref/v:SI ("AppList"))
            ]  7)))

If I remove the "static" storage attribute from AppList, the error 
disappears.  The corresponding rtx node is a bit different:

(mem/u:SI (plus:SI (reg:SI 3 ebx)
        (const:SI (unspec:SI[ 
                    (symbol_ref:SI ("AppList"))
                ]  6))) [0 S4 A8])

If I read the code correctly, by the time output_operand is called,
the expectation is that the rtx can be assembled with one instruction.
The failing node can't be output as a single x86 instruction, it looks
like it should be converted into two (or more) instructions.


Test case (x.cpp):
typedef struct {
   int                  Id;
   char Errors[128][10];
} ListElem_T;


//static
ListElem_T   AppList[100];

int
ListNextX()
{
   unsigned int i;
   ListElem_T x;

       x = AppList[i]; /* Structure Assignment */

   return -1;
}


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

* [Bug c++/11190] ICE in output_operand (wrong address) with static and -fPIC
  2003-06-13 23:48 [Bug c++/11190] New: ICE in output_operand (wrong address) with static and -fPIC eager@mvista.com
@ 2003-06-14  0:05 ` bangerth@dealii.org
  2003-06-14  0:10 ` pinskia@physics.uc.edu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bangerth@dealii.org @ 2003-06-14  0:05 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


bangerth@dealii.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From bangerth@dealii.org  2003-06-14 00:05 -------
I can't reproduce this with neither 3.2, 3.2.3, 3.3 or mainline. Can you
please post the output of gcc -v?

Thanks
  Wolfgang


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

* [Bug c++/11190] ICE in output_operand (wrong address) with static and -fPIC
  2003-06-13 23:48 [Bug c++/11190] New: ICE in output_operand (wrong address) with static and -fPIC eager@mvista.com
  2003-06-14  0:05 ` [Bug c++/11190] " bangerth@dealii.org
@ 2003-06-14  0:10 ` pinskia@physics.uc.edu
  2003-06-14  0:21 ` eager@mvista.com
  2003-07-27 18:48 ` pinskia at physics dot uc dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia@physics.uc.edu @ 2003-06-14  0:10 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From pinskia@physics.uc.edu  2003-06-14 00:10 -------
I cannot reproduce even on 3.2.2 so it looks like a modified compiler that is causing this.


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

* [Bug c++/11190] ICE in output_operand (wrong address) with static and -fPIC
  2003-06-13 23:48 [Bug c++/11190] New: ICE in output_operand (wrong address) with static and -fPIC eager@mvista.com
  2003-06-14  0:05 ` [Bug c++/11190] " bangerth@dealii.org
  2003-06-14  0:10 ` pinskia@physics.uc.edu
@ 2003-06-14  0:21 ` eager@mvista.com
  2003-07-27 18:48 ` pinskia at physics dot uc dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: eager@mvista.com @ 2003-06-14  0:21 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From eager@mvista.com  2003-06-14 00:21 -------
Subject: Re:  ICE in output_operand (wrong address) with static 
 and -fPIC

"bangerth@dealii.org" wrote:
> 
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11190
> 
> bangerth@dealii.org changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |WAITING
> 
> ------- Additional Comments From bangerth@dealii.org  2003-06-14 00:05 -------
> I can't reproduce this with neither 3.2, 3.2.3, 3.3 or mainline. Can you
> please post the output of gcc -v?

/opt/hardhat/devkit/x86/pentium3/bin/pentium3-g++ -v -da -save-temps -fPIC x.cpp -o x
Reading specs from /opt/hardhat/devkit/x86/pentium3/lib/gcc-lib/i686-hardhat-linux/3.2.2/specs
Configured with: ../configure --host=i686-pc-linux-gnu --target=i686-hardhat-linux --prefix=/opt/hardhat/devkit/x86/pentium3 --exec-prefix=/opt/hardhat/devkit/x86/pentium3
--bindir=/opt/hardhat/devkit/x86/pentium3/bin --sbindir=/opt/hardhat/devkit/x86/pentium3/sbin --sysconfdir=/opt/hardhat/devkit/x86/pentium3/etc --datadir=/opt/hardhat/devkit/x86/pentium3/share
--includedir=/opt/hardhat/devkit/x86/pentium3/include --libdir=/opt/hardhat/devkit/x86/pentium3/lib --libexecdir=/opt/hardhat/devkit/x86/pentium3/libexec
--localstatedir=/opt/hardhat/devkit/x86/pentium3/var --sharedstatedir=/opt/hardhat/devkit/x86/pentium3/share --mandir=/opt/hardhat/devkit/x86/pentium3/man
--infodir=/opt/hardhat/devkit/x86/pentium3/info --program-transform-name=s,^,pentium3-, --enable-cross --with-gxx-include-dir=${prefix}/i686-hardhat-linux/include/g++-v3 --enable-shared
--enable-languages=c,c++ --enable-__cxa_atexit --enable-threads=posix --disable-multilib --with-cpu=pentium3

I'll check to see if one of our patches mucked something.  Thanks.

--
Michael Eager     eager@mvista.com	408-328-8426	
MontaVista Software, Inc. 1237 E. Arques Ave., Sunnyvale, CA  94085


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

* [Bug c++/11190] ICE in output_operand (wrong address) with static and -fPIC
  2003-06-13 23:48 [Bug c++/11190] New: ICE in output_operand (wrong address) with static and -fPIC eager@mvista.com
                   ` (2 preceding siblings ...)
  2003-06-14  0:21 ` eager@mvista.com
@ 2003-07-27 18:48 ` pinskia at physics dot uc dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-27 18:48 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

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


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-27 18:48 -------
A modified compiler caused this problem so closing as invalid.


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

end of thread, other threads:[~2003-07-27 18:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-13 23:48 [Bug c++/11190] New: ICE in output_operand (wrong address) with static and -fPIC eager@mvista.com
2003-06-14  0:05 ` [Bug c++/11190] " bangerth@dealii.org
2003-06-14  0:10 ` pinskia@physics.uc.edu
2003-06-14  0:21 ` eager@mvista.com
2003-07-27 18:48 ` pinskia at physics dot uc dot edu

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).