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



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.2.4


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


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

* [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

* [Bug c++/35741] [4.2/4.3/4.4 regression] ICE with offsetof and references
  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
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-03-30 20:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-03-30 20:54 -------
Confirmed, it has been failing since at least 4.2.0 20061019 .


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-30 20:54:22
               date|                            |


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


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

* [Bug c++/35741] [4.2/4.3/4.4 regression] ICE with offsetof and references
  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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-02 17:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2008-04-02 17:17 -------
IMNSHO this is invalid.
[lib.support.types]/5 says the first argument must be a POD structure or POD
union, but struct A isn't POD structure because of the reference in it.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |ice-on-invalid-code


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


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

* [Bug c++/35741] [4.2/4.3/4.4 regression] ICE with offsetof and references
  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
                   ` (2 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-02 19:03 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-03-30 20:54:22         |2008-04-02 19:03:11
               date|                            |


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


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

* [Bug c++/35741] [4.2/4.3/4.4 regression] ICE with offsetof and references
  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
                   ` (3 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-03  7:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2008-04-03 07:44 -------
Subject: Bug 35741

Author: jakub
Date: Thu Apr  3 07:43:46 2008
New Revision: 133863

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133863
Log:
        PR c++/35741
        * semantics.c (finish_offsetof): Undo effect of convert_from_reference
        before calling fold_offsetof.

        * g++.dg/other/offsetof5.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/other/offsetof5.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/35741] [4.2/4.3/4.4 regression] ICE with offsetof and references
  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
                   ` (4 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-03  7:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2008-04-03 07:51 -------
Subject: Bug 35741

Author: jakub
Date: Thu Apr  3 07:51:01 2008
New Revision: 133864

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133864
Log:
        PR c++/35741
        * semantics.c (finish_offsetof): Undo effect of convert_from_reference
        before calling fold_offsetof.

        * g++.dg/other/offsetof5.C: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/other/offsetof5.C
Modified:
    branches/gcc-4_3-branch/gcc/cp/ChangeLog
    branches/gcc-4_3-branch/gcc/cp/semantics.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/35741] [4.2/4.3/4.4 regression] ICE with offsetof and references
  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
                   ` (5 preceding siblings ...)
  2008-04-03  7:52 ` jakub at gcc dot gnu dot org
@ 2008-04-03  7:53 ` jakub at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-03  7:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2008-04-03 07:52 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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