public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35741]  New: [4.2/4.3/4.4 regression] ICE with offsetof and references
@ 2008-03-28 19:27 reichelt at gcc dot gnu dot org
  2008-03-28 19:27 ` [Bug c++/35741] " reichelt at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-03-28 19:27 UTC (permalink / raw)
  To: gcc-bugs

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

=========================================
struct A
{
  char c;
  int& i;
};

int j = __builtin_offsetof (A, i);
=========================================

bug.cc:7: warning: invalid access to non-static data member 'A::i'  of NULL
object
bug.cc:7: warning: (perhaps the 'offsetof' macro was used incorrectly)
bug.cc:7: internal compiler error: in fold_offsetof_1, at c-common.c:6838
Please submit a full bug report, [etc.]


-- 
           Summary: [4.2/4.3/4.4 regression] ICE with offsetof and
                    references
           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=35741


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

end of thread, other threads:[~2008-04-03  7:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-28 19:27 [Bug c++/35741] New: [4.2/4.3/4.4 regression] ICE with offsetof and references reichelt at gcc dot gnu dot org
2008-03-28 19:27 ` [Bug c++/35741] " reichelt at gcc dot gnu dot org
2008-03-30 20:55 ` pinskia at gcc dot gnu dot org
2008-04-02 17:17 ` jakub at gcc dot gnu dot org
2008-04-02 19:03 ` jakub at gcc dot gnu dot org
2008-04-03  7:45 ` jakub at gcc dot gnu dot org
2008-04-03  7:52 ` jakub at gcc dot gnu dot org
2008-04-03  7:53 ` jakub 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).