public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/39213]  New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp
@ 2009-02-17  4:28 rob1weld at aol dot com
  2009-02-17 21:51 ` [Bug preprocessor/39213] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: rob1weld at aol dot com @ 2009-02-17  4:28 UTC (permalink / raw)
  To: gcc-bugs

+++ This bug was initially created as a clone of 
Bug #15913 "[4.0 Regression] Preprocessor dies 
on // comment if --traditional-cpp is specified" +++

The example in Bug #15913 compiles correctly with trunk revision 144203
but the Testsuite ../gcc_trunk/gcc/testsuite/gcc.dg/cpp/trad/include.c
does not. It compile without an ICE using gcc 3.4.3 so this is a 
Regression on the Trunk.


Works (gcc "3.4.3 (csl-sol210-3_4-branch+sol_rpath)") :

# /usr/sfw/bin/gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs
Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)

#/usr/sfw/bin/gcc -m64 -E --traditional-cpp
../gcc_trunk/gcc/testsuite/gcc.dg/cpp/trad/include.c -o delete-include.i
# (no error messages)


Works (Without "--traditional-cpp") :

# /usr/local/bin/gcc -m64 -E
/usr/share/src/gcc_trunk/gcc/testsuite/gcc.dg/cpp/trad/include.c -o
delete-include.i
/usr/share/src/gcc_trunk/gcc/testsuite/gcc.dg/cpp/trad/include.c:10:1: warning:
"__STDC__" redefined
# (no error messages)


Works (Without "-m64") :

# /usr/local/bin/gcc -E --traditional-cpp
/usr/share/src/gcc_trunk/gcc/testsuite/gcc.dg/cpp/trad/include.c -o
delete-include.i
# (no error messages)



ICE (use both "-m64" and "--traditional-cpp"):

# /usr/local/bin/gcc -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../gcc_trunk/configure --build=i386-pc-solaris2.11
--enable-languages=ada,c,c++,fortran,java,objc,obj-c++ --enable-shared
--disable-static --enable-multilib --enable-decimal-float
--with-long-double-128 --with-included-gettext --enable-stage1-checking
--enable-checking=release --with-tune=k8 --with-cpu=k8 --with-arch=k8
--with-gnu-as --with-as=/usr/local/bin/as --without-gnu-ld
--with-ld=/usr/bin/amd64/ld --with-gmp=/usr/local --with-mpfr=/usr/local
--without-ppl
Thread model: posix
gcc version 4.4.0 20090216 (experimental) [trunk revision 144203] (GCC) 

# /usr/local/bin/gcc -m64 -E --traditional-cpp
/usr/share/src/gcc_trunk/gcc/testsuite/gcc.dg/cpp/trad/include.c -o
delete-include.i
<built-in>:0: internal compiler error: Abort
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Thanks,
Rob


-- 
           Summary: [4.4 Regression] Preprocessor ICE with -m64 and --
                    traditional-cpp
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rob1weld at aol dot com
 GCC build triplet: i386-pc-solaris2.11
  GCC host triplet: i386-pc-solaris2.11
GCC target triplet: i386-pc-solaris2.11


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


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

* [Bug preprocessor/39213] Preprocessor ICE with -m64 and --traditional-cpp
  2009-02-17  4:28 [Bug preprocessor/39213] New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp rob1weld at aol dot com
@ 2009-02-17 21:51 ` pinskia at gcc dot gnu dot org
  2010-03-19 20:33 ` ro at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-02-17 21:51 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal
            Summary|[4.4 Regression]            |Preprocessor ICE with -m64
                   |Preprocessor ICE with -m64  |and --traditional-cpp
                   |and --traditional-cpp       |


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


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

* [Bug preprocessor/39213] Preprocessor ICE with -m64 and --traditional-cpp
  2009-02-17  4:28 [Bug preprocessor/39213] New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp rob1weld at aol dot com
  2009-02-17 21:51 ` [Bug preprocessor/39213] " pinskia at gcc dot gnu dot org
@ 2010-03-19 20:33 ` ro at gcc dot gnu dot org
  2010-06-20  2:11 ` [Bug preprocessor/39213] Regression [3.4.3] " rob1weld at aol dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu dot org @ 2010-03-19 20:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from ro at gcc dot gnu dot org  2010-03-19 20:32 -------
Fails on 64-bit Solaris 10, 11/SPARC, too.

I get the following stacktrace:

#0  0xfee7248c in abort () from /lib/libc.so.1
#1  0x08859957 in _cpp_process_line_notes (pfile=0x8b5c468, in_comment=0) at
/vol/gcc/src/hg/trunk/solaris/libcpp/lex.c:318
#2  0x0886153a in _cpp_scan_out_logical_line (pfile=0x8b5c468, macro=0x0) at
/vol/gcc/src/hg/trunk/solaris/libcpp/traditional.c:384
#3  0x08861d53 in _cpp_read_logical_line_trad (pfile=0x8b5c468) at
/vol/gcc/src/hg/trunk/solaris/libcpp/traditional.c:306
#4  0x0815e515 in scan_translation_unit_trad (pfile=0x8b5c468) at
/vol/gcc/src/hg/trunk/solaris/gcc/c-ppoutput.c:289
#5  preprocess_file (pfile=0x8b5c468) at
/vol/gcc/src/hg/trunk/solaris/gcc/c-ppoutput.c:95
#6  0x0815935b in c_common_init () at
/vol/gcc/src/hg/trunk/solaris/gcc/c-opts.c:1235
#7  0x08161ee8 in c_objc_common_init () at
/vol/gcc/src/hg/trunk/solaris/gcc/c-objc-common.c:74
#8  0x083f1a00 in lang_dependent_init (argc=18, argv=0x8047160) at
/vol/gcc/src/hg/trunk/solaris/gcc/toplev.c:2279
#9  do_compile (argc=18, argv=0x8047160) at
/vol/gcc/src/hg/trunk/solaris/gcc/toplev.c:2404
#10 toplev_main (argc=18, argv=0x8047160) at
/vol/gcc/src/hg/trunk/solaris/gcc/toplev.c:2447
#11 0x0817d4ef in main (argc=18, argv=0x8047160) at
/vol/gcc/src/hg/trunk/solaris/gcc/main.c:35

gdb claims note->type = 10


-- 

ro at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ro at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|i386-pc-solaris2.11         |*-*-solaris2*
   GCC host triplet|i386-pc-solaris2.11         |*-*-solaris2*
 GCC target triplet|i386-pc-solaris2.11         |*-*-solaris2*
      Known to fail|4.4.0                       |4.4.0 4.5.0
   Last reconfirmed|0000-00-00 00:00:00         |2010-03-19 20:32:59
               date|                            |


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


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

* [Bug preprocessor/39213] Regression [3.4.3] Preprocessor ICE with -m64 and --traditional-cpp
  2009-02-17  4:28 [Bug preprocessor/39213] New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp rob1weld at aol dot com
  2009-02-17 21:51 ` [Bug preprocessor/39213] " pinskia at gcc dot gnu dot org
  2010-03-19 20:33 ` ro at gcc dot gnu dot org
@ 2010-06-20  2:11 ` rob1weld at aol dot com
  2010-06-21 12:36 ` [Bug preprocessor/39213] [4.4/4.5/4.6 regression] " ro at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rob1weld at aol dot com @ 2010-06-20  2:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rob1weld at aol dot com  2010-06-20 02:10 -------
(In reply to comment #1)
> Fails on 64-bit Solaris 10, 11/SPARC, too.
Tossing "Regression" onto the "Summary", thanks for confirming,
Rob


-- 

rob1weld at aol dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Preprocessor ICE with -m64  |Regression [3.4.3]
                   |and --traditional-cpp       |Preprocessor ICE with -m64
                   |                            |and --traditional-cpp


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


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

* [Bug preprocessor/39213] [4.4/4.5/4.6 regression] Preprocessor ICE with -m64 and --traditional-cpp
  2009-02-17  4:28 [Bug preprocessor/39213] New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp rob1weld at aol dot com
                   ` (2 preceding siblings ...)
  2010-06-20  2:11 ` [Bug preprocessor/39213] Regression [3.4.3] " rob1weld at aol dot com
@ 2010-06-21 12:36 ` ro at gcc dot gnu dot org
  2010-06-24 11:52 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu dot org @ 2010-06-21 12:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ro at gcc dot gnu dot org  2010-06-21 12:35 -------
Updated summary (you list the regressed branches to fix, not the working one).


-- 

ro at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.4.0 4.5.0                 |4.4.5 4.5.1 4.6.0
      Known to work|3.4.3                       |3.4.6
            Summary|Regression [3.4.3]          |[4.4/4.5/4.6 regression]
                   |Preprocessor ICE with -m64  |Preprocessor ICE with -m64
                   |and --traditional-cpp       |and --traditional-cpp
   Target Milestone|---                         |4.6.0


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


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

* [Bug preprocessor/39213] [4.4/4.5/4.6 regression] Preprocessor ICE with -m64 and --traditional-cpp
  2009-02-17  4:28 [Bug preprocessor/39213] New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp rob1weld at aol dot com
                   ` (3 preceding siblings ...)
  2010-06-21 12:36 ` [Bug preprocessor/39213] [4.4/4.5/4.6 regression] " ro at gcc dot gnu dot org
@ 2010-06-24 11:52 ` jakub at gcc dot gnu dot org
  2010-06-24 12:20 ` ro at CeBiTec dot Uni-Bielefeld dot DE
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-24 11:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2010-06-24 11:51 -------
note->type == 10 is:
  *d = '\n';
  /* A sentinel note that should never be processed.  */
  add_line_note (buffer, d + 1, '\n');
  buffer->next_line = s + 1;
created.  But, as this PR lacks a testcase (well, the testcase depends on a
proprietary header file not included here), it is hard to guess what's going
on.
Can you see if doing just
cp /usr/include/stdlib.h /tmp/stdlib.h
gcc -E -traditional-cpp /tmp/stdlib.h
If yes, can you distill a smaller testcase from it (ideally at most a few
lines)?


-- 


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


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

* [Bug preprocessor/39213] [4.4/4.5/4.6 regression] Preprocessor ICE with -m64 and --traditional-cpp
  2009-02-17  4:28 [Bug preprocessor/39213] New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp rob1weld at aol dot com
                   ` (4 preceding siblings ...)
  2010-06-24 11:52 ` jakub at gcc dot gnu dot org
@ 2010-06-24 12:20 ` ro at CeBiTec dot Uni-Bielefeld dot DE
  2010-06-24 12:56 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld dot DE @ 2010-06-24 12:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from ro at CeBiTec dot Uni-Bielefeld dot DE  2010-06-24 12:20 -------
Subject: Re:  [4.4/4.5/4.6 regression] Preprocessor ICE with -m64 and
--traditional-cpp

> ------- Comment #4 from jakub at gcc dot gnu dot org  2010-06-24 11:51 -------

> created.  But, as this PR lacks a testcase (well, the testcase depends on a
> proprietary header file not included here), it is hard to guess what's going
> on.

I could include the OpenSolaris header, which is licensed under CDDL,
but I've just been able to construct a minimal testcase:

$ cat include.c
#include <stdlib.h>
$ cat stdlib.h
#pragma redefine_extname        mkstemp64       mkstemp
$ ./cc1 -E -traditional-cpp ./include.c -o include.i -I . -m64
In file included from ./include.c:2:0:
./stdlib.h:1:0: internal compiler error: Abort

This should make it easier to find what's going on.  Unlike the original
test case from the GCC testsuite, this one fails even without -m64.

        Rainer


-- 


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


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

* [Bug preprocessor/39213] [4.4/4.5/4.6 regression] Preprocessor ICE with -m64 and --traditional-cpp
  2009-02-17  4:28 [Bug preprocessor/39213] New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp rob1weld at aol dot com
                   ` (5 preceding siblings ...)
  2010-06-24 12:20 ` ro at CeBiTec dot Uni-Bielefeld dot DE
@ 2010-06-24 12:56 ` jakub at gcc dot gnu dot org
  2010-06-24 13:50 ` ro at CeBiTec dot Uni-Bielefeld dot DE
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-06-24 12:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2010-06-24 12:56 -------
Can't reproduce on x86_64-linux (and, #pragma redefine_extname seems to be
handled on all targets, not just Solaris).


-- 


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


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

* [Bug preprocessor/39213] [4.4/4.5/4.6 regression] Preprocessor ICE with -m64 and --traditional-cpp
  2009-02-17  4:28 [Bug preprocessor/39213] New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp rob1weld at aol dot com
                   ` (6 preceding siblings ...)
  2010-06-24 12:56 ` jakub at gcc dot gnu dot org
@ 2010-06-24 13:50 ` ro at CeBiTec dot Uni-Bielefeld dot DE
  2010-06-25 16:48 ` ro at CeBiTec dot Uni-Bielefeld dot DE
  2010-07-14 17:27 ` rob1weld at aol dot com
  9 siblings, 0 replies; 11+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld dot DE @ 2010-06-24 13:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ro at CeBiTec dot Uni-Bielefeld dot DE  2010-06-24 13:50 -------
Subject: Re:  [4.4/4.5/4.6 regression] Preprocessor ICE with -m64 and
--traditional-cpp

> ------- Comment #6 from jakub at gcc dot gnu dot org  2010-06-24 12:56 -------
> Can't reproduce on x86_64-linux (and, #pragma redefine_extname seems to be
> handled on all targets, not just Solaris).

This seems to be extremely sensitive to command line parameters.  E.g. on
mips-sgi-irix6.5 it works (no ICE) with

$ cc1 -E -tditional-cpp include.c -o include.i -I .

When I add either -mabi=n32 or -mabi=64, cc1 aborts.

Similarly, on sparc-sun-solaris2.11:

$ cc1 -E -traditional-cpp include.c -o include.i -I .

ICEs

$ cc1 -E -traditional-cpp `pwd`/include.c -o include.i -I .

works.

        Rainer


-- 


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


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

* [Bug preprocessor/39213] [4.4/4.5/4.6 regression] Preprocessor ICE with -m64 and --traditional-cpp
  2009-02-17  4:28 [Bug preprocessor/39213] New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp rob1weld at aol dot com
                   ` (7 preceding siblings ...)
  2010-06-24 13:50 ` ro at CeBiTec dot Uni-Bielefeld dot DE
@ 2010-06-25 16:48 ` ro at CeBiTec dot Uni-Bielefeld dot DE
  2010-07-14 17:27 ` rob1weld at aol dot com
  9 siblings, 0 replies; 11+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld dot DE @ 2010-06-25 16:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from ro at CeBiTec dot Uni-Bielefeld dot DE  2010-06-25 16:48 -------
Subject: Re:  [4.4/4.5/4.6 regression] Preprocessor ICE with -m64 and
--traditional-cpp

It occured to me that this is only failing for me with 32-bit cc1,
i.e. i386-pc-solaris2.11, sparc-sun-solaris2.11, mips-sgi-irix6.5, but
not alpha-dec-osf5.1 (which is 64-bit).

        Rainer


-- 


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


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

* [Bug preprocessor/39213] [4.4/4.5/4.6 regression] Preprocessor ICE with -m64 and --traditional-cpp
  2009-02-17  4:28 [Bug preprocessor/39213] New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp rob1weld at aol dot com
                   ` (8 preceding siblings ...)
  2010-06-25 16:48 ` ro at CeBiTec dot Uni-Bielefeld dot DE
@ 2010-07-14 17:27 ` rob1weld at aol dot com
  9 siblings, 0 replies; 11+ messages in thread
From: rob1weld at aol dot com @ 2010-07-14 17:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rob1weld at aol dot com  2010-07-14 17:27 -------
Thanks for working on this guys, 
Rob


-- 


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


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

end of thread, other threads:[~2010-07-14 17:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-17  4:28 [Bug preprocessor/39213] New: [4.4 Regression] Preprocessor ICE with -m64 and --traditional-cpp rob1weld at aol dot com
2009-02-17 21:51 ` [Bug preprocessor/39213] " pinskia at gcc dot gnu dot org
2010-03-19 20:33 ` ro at gcc dot gnu dot org
2010-06-20  2:11 ` [Bug preprocessor/39213] Regression [3.4.3] " rob1weld at aol dot com
2010-06-21 12:36 ` [Bug preprocessor/39213] [4.4/4.5/4.6 regression] " ro at gcc dot gnu dot org
2010-06-24 11:52 ` jakub at gcc dot gnu dot org
2010-06-24 12:20 ` ro at CeBiTec dot Uni-Bielefeld dot DE
2010-06-24 12:56 ` jakub at gcc dot gnu dot org
2010-06-24 13:50 ` ro at CeBiTec dot Uni-Bielefeld dot DE
2010-06-25 16:48 ` ro at CeBiTec dot Uni-Bielefeld dot DE
2010-07-14 17:27 ` rob1weld at aol dot com

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