[LLVMbugs] [Bug 719] NEW: llvm-gcc assertion failure when include file not found

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Mar 21 15:51:20 PST 2006


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=719

           Summary: llvm-gcc assertion failure when include file not found
           Product: tools
           Version: 1.6
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: u3950692 at anu.edu.au


Hi,

I recently installed LLVM on a Gentoo Linux x86 system, and ran into an internal
compiler assertion failure while trying to compile some simple code.  There is a
workaround, but since a bug report was advised, I decided to file one.

The code, in a file called hello.c:
===================================
#include <stdio.h>
int main() {
    printf("hello world\n");
    return 0;
}

The command line:
=================
llvm-gcc -o hello hello.c

The output, including the assertion failure:
============================================
In file included from hello.c:1:
/usr/include/stdio.h:34:21: stddef.h: No such file or directory
In file included from /usr/include/_G_config.h:44,
                 from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:72,
                 from hello.c:1:
/usr/include/gconv.h:72: error: syntax error before "size_t"
/usr/include/gconv.h:88: error: syntax error before "size_t"
/usr/include/gconv.h:97: error: syntax error before "size_t"
/usr/include/gconv.h:174: error: syntax error before "size_t"
/usr/include/gconv.h:177: error: syntax error before '}' token
In file included from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:72,
                 from hello.c:1:
/usr/include/_G_config.h:47: error: field `__cd' has incomplete type
/usr/include/_G_config.h:50: error: field `__cd' has incomplete type
cc1: /home/vadve/criswell/rel16/llvm-gcc/gcc/llvm-types.c:680: GetFieldOffset:
Assertion `(__extension__ ({ const tree __t = (Field); if (((enum tree_code)
(__t)->common.code) != (FIELD_DECL)) tree_check_failed (__t, (FIELD_DECL),
"/home/vadve/criswell/rel16/llvm-gcc/gcc/llvm-types.c", 680, __FUNCTION__); __t;
})->decl.u2.t) != 0 && (__extension__ ({ const tree __t = (Field); if (((enum
tree_code) (__t)->common.code) != (FIELD_DECL)) tree_check_failed (__t,
(FIELD_DECL), "/home/vadve/criswell/rel16/llvm-gcc/gcc/llvm-types.c", 680,
__FUNCTION__); __t; })->decl.arguments) != 0' failed.
/usr/include/_G_config.h:53: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.cs.uiuc.edu> for instructions.

The workaround: Use -I to find the include file mentioned:
==========================================================
llvm-gcc
-I/usr/local/bin/llvm/cfrontend/x86/llvm-gcc/lib/gcc/i686-pc-linux-gnu/3.4-llvm/include/
-o hello hello.c



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the llvm-bugs mailing list