public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28294]  New: [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof
@ 2006-07-06 21:10 reichelt at gcc dot gnu dot org
  2006-07-06 21:11 ` [Bug c++/28294] " reichelt at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-06 21:10 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE since at GCC 4.0.0:

============================================
struct A
{
  static int foo();
};

int i = __builtin_offsetof(A, foo[0]);
============================================

bug.cc:6: error: pointer to a function used in arithmetic
bug.cc:6: internal compiler error: tree check: expected class 'expression',
have 'declaration' (function_decl) in finish_offsetof, at cp/semantics.c:2895
Please submit a full bug report, [etc.]

Testing a patch.


-- 
           Summary: [4.0/4.1/4.2 regression] ICE with invalid use of
                    __builtin_offsetof
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: reichelt at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c++/28294] [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof
  2006-07-06 21:10 [Bug c++/28294] New: [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
@ 2006-07-06 21:11 ` reichelt at gcc dot gnu dot org
  2006-07-13 17:00 ` patchapp at dberlin dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-06 21:11 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.4


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


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

* [Bug c++/28294] [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof
  2006-07-06 21:10 [Bug c++/28294] New: [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
  2006-07-06 21:11 ` [Bug c++/28294] " reichelt at gcc dot gnu dot org
@ 2006-07-13 17:00 ` patchapp at dberlin dot org
  2006-07-15  9:29 ` reichelt at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: patchapp at dberlin dot org @ 2006-07-13 17:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from patchapp at dberlin dot org  2006-07-13 17:00 -------
Subject: Bug number PR c++/28294

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00586.html


-- 


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


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

* [Bug c++/28294] [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof
  2006-07-06 21:10 [Bug c++/28294] New: [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
  2006-07-06 21:11 ` [Bug c++/28294] " reichelt at gcc dot gnu dot org
  2006-07-13 17:00 ` patchapp at dberlin dot org
@ 2006-07-15  9:29 ` reichelt at gcc dot gnu dot org
  2006-07-15  9:34 ` reichelt at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-15  9:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from reichelt at gcc dot gnu dot org  2006-07-15 09:29 -------
Subject: Bug 28294

Author: reichelt
Date: Sat Jul 15 09:29:32 2006
New Revision: 115466

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115466
Log:
        PR c++/28294
        * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
        only.

        * g++.dg/ext/offsetof1.C: Add test with function pointer arithmetic.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/ext/offsetof1.C


-- 


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


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

* [Bug c++/28294] [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof
  2006-07-06 21:10 [Bug c++/28294] New: [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-07-15  9:29 ` reichelt at gcc dot gnu dot org
@ 2006-07-15  9:34 ` reichelt at gcc dot gnu dot org
  2006-07-15  9:38 ` reichelt at gcc dot gnu dot org
  2006-07-15 10:09 ` reichelt at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-15  9:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from reichelt at gcc dot gnu dot org  2006-07-15 09:34 -------
Subject: Bug 28294

Author: reichelt
Date: Sat Jul 15 09:34:27 2006
New Revision: 115467

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115467
Log:
        PR c++/28294
        * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
        only.

        * g++.dg/ext/offsetof1.C: Add test with function pointer arithmetic.

Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/semantics.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/offsetof1.C


-- 


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


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

* [Bug c++/28294] [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof
  2006-07-06 21:10 [Bug c++/28294] New: [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-07-15  9:34 ` reichelt at gcc dot gnu dot org
@ 2006-07-15  9:38 ` reichelt at gcc dot gnu dot org
  2006-07-15 10:09 ` reichelt at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-15  9:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from reichelt at gcc dot gnu dot org  2006-07-15 09:38 -------
Subject: Bug 28294

Author: reichelt
Date: Sat Jul 15 09:38:02 2006
New Revision: 115468

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115468
Log:
        PR c++/28294
        * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
        only.

        * g++.dg/ext/offsetof1.C: Add test with function pointer arithmetic.

Modified:
    branches/gcc-4_0-branch/gcc/cp/ChangeLog
    branches/gcc-4_0-branch/gcc/cp/semantics.c
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_0-branch/gcc/testsuite/g++.dg/ext/offsetof1.C


-- 


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


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

* [Bug c++/28294] [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof
  2006-07-06 21:10 [Bug c++/28294] New: [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-07-15  9:38 ` reichelt at gcc dot gnu dot org
@ 2006-07-15 10:09 ` reichelt at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-07-15 10:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from reichelt at gcc dot gnu dot org  2006-07-15 10:08 -------
Fixed on mainline, 4.1 branch, and 4.0 branch.


-- 

reichelt at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2006-07-15 10:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-06 21:10 [Bug c++/28294] New: [4.0/4.1/4.2 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
2006-07-06 21:11 ` [Bug c++/28294] " reichelt at gcc dot gnu dot org
2006-07-13 17:00 ` patchapp at dberlin dot org
2006-07-15  9:29 ` reichelt at gcc dot gnu dot org
2006-07-15  9:34 ` reichelt at gcc dot gnu dot org
2006-07-15  9:38 ` reichelt at gcc dot gnu dot org
2006-07-15 10:09 ` 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).