The code below gives the following error:
internal compiler error: tree check: expected class type, have exceptional 
(error_mark) in 
build_pointer_type_for_mode, at tree.c:4246
    This sounds like bug 18177, but that was supposedly fixed in 4.0.0.
    PalmSource bug 105393.

Here's the code:
typedef int32_t (*ProcPtr)();void Dispatcher(int32_t startCode)   
(__builtin_offsetof (ArgsType, 
largeMsgLen) + sizeof(Args.largeMsgLen)))

    "__builtin_offsetof" is necessary for the crash, and is an artifact of 
preprocessing.  This is a Delta-
reduction of a larger file which fails without error under g++ 3.3.4, 
presumably correctly, due to a 
missing include file.


Here's the session:
93> /opt/gcc401chk/bin/g++ -v ../cpp/bugfiles/GCC_bugfiles/error/
105393_CertMgrDispatcher_min.i
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --enable-checking --prefix=/opt/gcc401chk 
--enable-languages=c,c+
+
Thread model: posix
gcc version 4.0.1
 /opt/gcc401chk/libexec/gcc/i686-pc-linux-gnu/4.0.1/cc1plus -fpreprocessed 
../cpp/bugfiles/
GCC_bugfiles/error/105393_CertMgrDispatcher_min.i -quiet -dumpbase 
105393_CertMgrDispatcher_min.i -mtune=pentiumpro -auxbase 
105393_CertMgrDispatcher_min -
version -o /tmp/cczS74RP.s
GNU C++ version 4.0.1 (i686-pc-linux-gnu)
        compiled by GNU C version 3.3.4 (pre 3.3.5 20040809).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
../cpp/bugfiles/GCC_bugfiles/error/105393_CertMgrDispatcher_min.i:1: error: ISO 
C++ forbids 
declaration of ‘int32_t’ with no type
../cpp/bugfiles/GCC_bugfiles/error/105393_CertMgrDispatcher_min.i:1: error: 
typedef ‘int32_t’ 
is initialized (use __typeof__ instead)
../cpp/bugfiles/GCC_bugfiles/error/105393_CertMgrDispatcher_min.i:1: error: 
‘ProcPtr’ was not 
declared in this scope
../cpp/bugfiles/GCC_bugfiles/error/105393_CertMgrDispatcher_min.i:1: error: 
expected ‘,’ or â
€˜;’ before ‘(’ token
../cpp/bugfiles/GCC_bugfiles/error/105393_CertMgrDispatcher_min.i:3: error: 
function ‘void 
Dispatcher(int32_t)’ is initialized like a variable
../cpp/bugfiles/GCC_bugfiles/error/105393_CertMgrDispatcher_min.i:3: error: 
expected type-specifier 
before ‘ArgsType’
../cpp/bugfiles/GCC_bugfiles/error/105393_CertMgrDispatcher_min.i:3: error: 
expected `,' before â
€˜ArgsType’
../cpp/bugfiles/GCC_bugfiles/error/105393_CertMgrDispatcher_min.i:3: internal 
compiler error: tree 
check: expected class ‘type’, have ‘exceptional’ (error_mark) in 
build_pointer_type_for_mode, at tree.c:4246
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

-- 
           Summary: tree check: expected class type, have exceptional
                    (error_mark) in build_pointer_type_for_mode, at
                    tree.c:4246
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: flash at pobox dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

Reply via email to