This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bug in CPP with -include switch?
The problem is that config/mips/mips.h defines a whole bunch of junk to
split the assembly into two files (text and data). Later, my
configuration includes config/elfos.h. This overrides the
ASM_FILE_START definition and so the FILE * that is used by the mips.h
defined macros never gets initialized.
Reading the config.gcc it appears that several configurations use
elfos.h. Linux is one of them. It also states in the config.gcc that
this is the proper order for includes. So I have to conclude that the
implementation in mips.h is broken.
Sean
On Sat, 2003-02-22 at 07:09, Neil Booth wrote:
> Sean McNeil wrote:-
>
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x283b566b in vfprintf () from /usr/lib/libc.so.4
> > (gdb) bt
> > #0 0x283b566b in vfprintf () from /usr/lib/libc.so.4
> > #1 0x283b52c8 in fprintf () from /usr/lib/libc.so.4
> > #2 0x82522d1 in mips_output_filename (stream=0x0, name=0x840a825
> > "cpuHack.h")
> > at /usr/home/sean/gnu/sources/gcc/config/mips/mips.c:6582
> > #3 0x8220af3 in output_file_directive (asm_file=0x0,
> > input_name=0x840a800
> > "/usr/home/sean/gnu/windriver/include/cpuHack.h")
> > at /usr/home/sean/gnu/sources/gcc/toplev.c:1826
> > #4 0x8204ae8 in sdbout_start_source_file (line=5,
> > filename=0x840a800 "/usr/home/sean/gnu/windriver/include/cpuHack.h")
> > at /usr/home/sean/gnu/sources/gcc/sdbout.c:1712
>
> The NULL pointer in #3 looks suspicious; you might try investigating why
> that is happening.
>
> Neil.