public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49480] New: internal compiler error: output_operand: invalid expression as operand
@ 2011-06-20 22:03 tom239 at gmail dot com
  2011-06-21  9:37 ` [Bug target/49480] " rguenth at gcc dot gnu.org
  2021-08-09  6:23 ` [Bug c++/49480] " pinskia at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: tom239 at gmail dot com @ 2011-06-20 22:03 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: internal compiler error: output_operand: invalid
                    expression as operand
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tom239@gmail.com


When asked to compile the following C++ source, gcc gives the message 
"internal compiler error: output_operand: invalid expression as operand"
The program in full (it's only one line long) is:

char  cc[300];   int& c = *(int*)(int(&cc[150]) & ~15);

Invoke gcc with no command line arguments, e.g.
  gcc sample.cc
( although I saw the same thing on x86_64 when compiling with -m32 )


g++ -v output:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--enable-multiarch --enable-linker-build-id --with-system-zlib
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc
--enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) 



uname -a output:

Linux crux 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:54:21 UTC 2011 i686
GNU/Linux


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

* [Bug target/49480] internal compiler error: output_operand: invalid expression as operand
  2011-06-20 22:03 [Bug c++/49480] New: internal compiler error: output_operand: invalid expression as operand tom239 at gmail dot com
@ 2011-06-21  9:37 ` rguenth at gcc dot gnu.org
  2021-08-09  6:23 ` [Bug c++/49480] " pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-21  9:37 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |i?86-*-*
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2011.06.21 09:36:34
          Component|c++                         |target
     Ever Confirmed|0                           |1
      Known to fail|                            |4.1.2, 4.3.5, 4.4.5, 4.5.2,
                   |                            |4.6.0

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-21 09:36:34 UTC ---
Confirmed.  The code has undefined behavior at runtime.


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

* [Bug c++/49480] internal compiler error: output_operand: invalid expression as operand
  2011-06-20 22:03 [Bug c++/49480] New: internal compiler error: output_operand: invalid expression as operand tom239 at gmail dot com
  2011-06-21  9:37 ` [Bug target/49480] " rguenth at gcc dot gnu.org
@ 2021-08-09  6:23 ` pinskia at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-09  6:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49480

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
          Component|target                      |c++

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The C++ compiler in GCC 4.7+ decides this needs runtime calculation and does
that instead. I don't want to figure out which patch to the C++ front-end that
changes that.

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

end of thread, other threads:[~2021-08-09  6:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-20 22:03 [Bug c++/49480] New: internal compiler error: output_operand: invalid expression as operand tom239 at gmail dot com
2011-06-21  9:37 ` [Bug target/49480] " rguenth at gcc dot gnu.org
2021-08-09  6:23 ` [Bug c++/49480] " pinskia at gcc dot gnu.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).