public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38699]  New: [4.2/4.3/4.4 regression] ICE using offsetof with array
@ 2009-01-02 14:41 reichelt at gcc dot gnu dot org
  2009-01-02 14:42 ` [Bug c++/38699] " reichelt at gcc dot gnu dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-01-02 14:41 UTC (permalink / raw)
  To: gcc-bugs

The following valid code snippet triggers an ICE since GCC 4.2.0:

======================================
struct A
{
  const char* p;
};

void foo()
{
  __builtin_offsetof(struct A, p[0]);
}
======================================

bug.cc: In function 'void foo()':
bug.cc:8: internal compiler error: in fold_offsetof_1, at c-common.c:7647
Please submit a full bug report, [etc.]

The code is accepted by the C frontend.


-- 
           Summary: [4.2/4.3/4.4 regression] ICE using offsetof with array
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

end of thread, other threads:[~2009-11-09 21:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-02 14:41 [Bug c++/38699] New: [4.2/4.3/4.4 regression] ICE using offsetof with array reichelt at gcc dot gnu dot org
2009-01-02 14:42 ` [Bug c++/38699] " reichelt at gcc dot gnu dot org
2009-01-02 15:21 ` jakub at gcc dot gnu dot org
2009-01-02 20:09 ` pinskia at gcc dot gnu dot org
2009-01-02 22:27 ` pinskia at gcc dot gnu dot org
2009-01-03  0:14 ` pinskia at gcc dot gnu dot org
2009-01-03  6:00 ` pinskia at gcc dot gnu dot org
2009-01-03 15:32 ` [Bug c++/38699] [4.2/4.3/4.4 regression] ICE using offsetof with pointer and array accesses rguenth at gcc dot gnu dot org
2009-02-04  7:53 ` bonzini at gnu dot org
2009-03-31 21:06 ` [Bug c++/38699] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
2009-08-04 12:46 ` rguenth at gcc dot gnu dot org
2009-09-20 20:12 ` pinskia at gcc dot gnu dot org
2009-10-28 15:42 ` dodji at redhat dot com
2009-10-28 15:59 ` dodji at gcc dot gnu dot org
2009-10-29 21:18 ` dodji at gcc dot gnu dot org
2009-11-03 10:45 ` dodji at gcc dot gnu dot org
2009-11-03 10:46 ` dodji at gcc dot gnu dot org
2009-11-03 13:21 ` dodji at gcc dot gnu dot org
2009-11-09 21:42 ` reichelt at gcc dot gnu 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).