public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/15307] New: Preprocessor ICE on invalid input
@ 2004-05-06 6:55 nisse at lysator dot liu dot se
2004-05-06 6:58 ` [Bug preprocessor/15307] " nisse at lysator dot liu dot se
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: nisse at lysator dot liu dot se @ 2004-05-06 6:55 UTC (permalink / raw)
To: gcc-bugs
gcc-3.4.0, built with ./configure && make bootstrap && make install
Preprocessing crashes with
bug.c:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
when the correct behaviour would be to output an error message
unterminated argument list invoking macro "ASSERT"
Compilation command line:
gcc -DWANT_CHECKS=1 -E bug.c
Source file (before preprocessing, but there are no #include
directives in it) is attached.
--
Summary: Preprocessor ICE on invalid input
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nisse at lysator dot liu dot se
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/15307] Preprocessor ICE on invalid input
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
@ 2004-05-06 6:58 ` nisse at lysator dot liu dot se
2004-05-06 14:25 ` bangerth at dealii dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: nisse at lysator dot liu dot se @ 2004-05-06 6:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From nisse at lysator dot liu dot se 2004-05-06 06:58 -------
Created an attachment (id=6237)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6237&action=view)
Input file that crashes preprocessor
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/15307] Preprocessor ICE on invalid input
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
2004-05-06 6:58 ` [Bug preprocessor/15307] " nisse at lysator dot liu dot se
@ 2004-05-06 14:25 ` bangerth at dealii dot org
2004-05-06 14:36 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2004-05-06 14:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-05-06 14:25 -------
I can't confirm this. From the given command line, I get all the preprocessed
output and then the message
x.c:383:2: unterminated argument list invoking macro "ASSERT"
ASSERT
Can someone else please check?
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/15307] Preprocessor ICE on invalid input
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
2004-05-06 6:58 ` [Bug preprocessor/15307] " nisse at lysator dot liu dot se
2004-05-06 14:25 ` bangerth at dealii dot org
@ 2004-05-06 14:36 ` pinskia at gcc dot gnu dot org
2004-05-06 15:13 ` nisse at lysator dot liu dot se
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-06 14:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-06 14:36 -------
I get the same thing as Wolfgang get so are you sure that you get this every time or that you did not
make a mistake when compiling GCC?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/15307] Preprocessor ICE on invalid input
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
` (2 preceding siblings ...)
2004-05-06 14:36 ` pinskia at gcc dot gnu dot org
@ 2004-05-06 15:13 ` nisse at lysator dot liu dot se
2004-05-06 15:20 ` [Bug preprocessor/15307] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: nisse at lysator dot liu dot se @ 2004-05-06 15:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From nisse at lysator dot liu dot se 2004-05-06 15:13 -------
Strange. I've now double checked that the file in the attachment is
the same one as I have locally. And I built gcc with plain ./configure
&& make bootstrap && make install, no special options.
Output from "gcc -v -DWANT_CHECKS=1 -E bug.c ":
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
Configured with: /usr/local/src/gcc-3.4.0/configure
Thread model: posix
gcc version 3.4.0
/usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1 -E -quiet -v -DWANT_CHECKS=1
bug.c -mtune=pentiumpro
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory
"/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include
/usr/include
End of search list.
# 1 "bug.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "bug.c"
static void
hbgcd2 (mp_limb_t ah, mp_limb_t al, mp_limb_t bh, mp_limb_t bl, unsigned k,
struct bgcd_matrix1 *m)
{
# 30 "bug.c"
static const unsigned char zerobits_table[0x16] =
{ 0,1,2,1,3,1,2,1,4,1,2,1,3,1,2,1 };
mp_limb_signed_t r00, r01, r10, r11;
unsigned j;
ASSERT_ALWAYS (ODD (al));
ASSERT_ALWAYS (!ODD (bl));
ASSERT_ALWAYS (k <= SMALL_STEP_BITS);
r00 = r11 = 1;
r01 = r10 = 0;
j = 0;
while (k - j > GMP_NUMB_BITS / 2)
{
unsigned bits;
mp_limb_t t0, t1;
mp_limb_signed_t q;
TRACE (printf ("hgcd2: a = %8lx %08lx\n"
" b = %8lx %08lx\n",
ah, al, bh, bl));
ASSERT_ALWAYS (ODD (al));
bug.c:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Running cc1 in gdb, run -E -quiet -v -DWANT_CHECKS=1
/home/nisse/hack/gcd/bug.c -mtune=pentiumpro, I get the backtrace
#0 0x0808baf0 in lex_number (pfile=0x8431258, number=0x8447000)
at /usr/local/src/gcc-3.4.0/gcc/cpplex.c:528
#1 0x0808c24c in _cpp_lex_direct (pfile=0x8431258)
at /usr/local/src/gcc-3.4.0/gcc/cpplex.c:1042
#2 0x0808c70c in _cpp_lex_token (pfile=0x8431258)
at /usr/local/src/gcc-3.4.0/gcc/cpplex.c:710
#3 0x0808d26c in cpp_get_token (pfile=0x8431258)
at /usr/local/src/gcc-3.4.0/gcc/cppmacro.c:1061
#4 0x0808da31 in cpp_get_token (pfile=0x8431258)
at /usr/local/src/gcc-3.4.0/gcc/cppmacro.c:578
#5 0x08084b78 in preprocess_file (pfile=0x8431258)
at /usr/local/src/gcc-3.4.0/gcc/c-ppoutput.c:135
#6 0x0807f45f in c_common_init ()
at /usr/local/src/gcc-3.4.0/gcc/c-opts.c:1195
#7 0x08086d6e in c_objc_common_init ()
at /usr/local/src/gcc-3.4.0/gcc/c-objc-common.c:166
#8 0x08275f59 in toplev_main (argc=1, argv=0x0)
at /usr/local/src/gcc-3.4.0/gcc/toplev.c:4527
#9 0x0809962e in main (argc=1, argv=0x1)
at /usr/local/src/gcc-3.4.0/gcc/main.c:35
The number argument to lex_number is invalid according to gdb ("Cannot
access memory at address 0x8447000"). This comes ultimately from
cpp_token *result = pfile->cur_token++;
at the start of _cpp_lex_direct.
I don't have much clue on how to debug this. I could try to reduce the
testcase further.
Note that the -DWANT_CHECKS=1 on the command line is essential.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/15307] [3.3/3.4/3.5 Regression] Preprocessor ICE on invalid input
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
` (3 preceding siblings ...)
2004-05-06 15:13 ` nisse at lysator dot liu dot se
@ 2004-05-06 15:20 ` pinskia at gcc dot gnu dot org
2004-06-06 3:57 ` giovannibajo at libero dot it
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-06 15:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-06 15:20 -------
Oh, I must have missed the -DWANT_CHECKS=1 when I first read the bug report, anyways confirmed, a
regression from 3.2.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Ever Confirmed| |1
Keywords| |ice-on-invalid-code
Known to fail| |3.3.3 3.4.0 3.5.0
Known to work| |3.2.3
Last reconfirmed|0000-00-00 00:00:00 |2004-05-06 15:20:36
date| |
Summary|Preprocessor ICE on invalid |[3.3/3.4/3.5 Regression]
|input |Preprocessor ICE on invalid
| |input
Target Milestone|--- |3.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/15307] [3.3/3.4/3.5 Regression] Preprocessor ICE on invalid input
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
` (4 preceding siblings ...)
2004-05-06 15:20 ` [Bug preprocessor/15307] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-06-06 3:57 ` giovannibajo at libero dot it
2004-06-22 8:09 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: giovannibajo at libero dot it @ 2004-06-06 3:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-06-06 03:57 -------
Retargeting to 3.4.1, being a regression on that release branch.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |gdr at gcc dot gnu dot org
Target Milestone|3.3.4 |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/15307] [3.3/3.4/3.5 Regression] Preprocessor ICE on invalid input
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
` (5 preceding siblings ...)
2004-06-06 3:57 ` giovannibajo at libero dot it
@ 2004-06-22 8:09 ` mmitchel at gcc dot gnu dot org
2004-08-29 18:06 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-22 8:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-06-22 08:09 -------
Postponed until GCC 3.4.2.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.1 |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/15307] [3.3/3.4/3.5 Regression] Preprocessor ICE on invalid input
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
` (6 preceding siblings ...)
2004-06-22 8:09 ` mmitchel at gcc dot gnu dot org
@ 2004-08-29 18:06 ` mmitchel at gcc dot gnu dot org
2004-10-23 21:34 ` [Bug preprocessor/15307] [3.3/3.4 " pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-29 18:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-08-29 18:06 -------
Postponed all ice-on-invalid bugs to GCC 3.4.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.2 |3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/15307] [3.3/3.4 Regression] Preprocessor ICE on invalid input
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
` (7 preceding siblings ...)
2004-08-29 18:06 ` mmitchel at gcc dot gnu dot org
@ 2004-10-23 21:34 ` pinskia at gcc dot gnu dot org
2004-11-01 0:46 ` mmitchel at gcc dot gnu dot org
2005-05-19 17:40 ` mmitchel at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-23 21:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-23 21:34 -------
Fixed at least on the mainline.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|3.3.3 3.4.0 4.0 |3.3.3 3.4.0
Known to work|3.2.3 |3.2.3 4.0.0
Summary|[3.3/3.4/4.0 Regression] |[3.3/3.4 Regression]
|Preprocessor ICE on invalid |Preprocessor ICE on invalid
|input |input
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/15307] [3.3/3.4 Regression] Preprocessor ICE on invalid input
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
` (8 preceding siblings ...)
2004-10-23 21:34 ` [Bug preprocessor/15307] [3.3/3.4 " pinskia at gcc dot gnu dot org
@ 2004-11-01 0:46 ` mmitchel at gcc dot gnu dot org
2005-05-19 17:40 ` mmitchel at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-11-01 0:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-11-01 00:45 -------
Postponed until GCC 3.4.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.3 |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug preprocessor/15307] [3.3/3.4 Regression] Preprocessor ICE on invalid input
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
` (9 preceding siblings ...)
2004-11-01 0:46 ` mmitchel at gcc dot gnu dot org
@ 2005-05-19 17:40 ` mmitchel at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:40 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.4 |3.4.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15307
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-05-19 17:40 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-06 6:55 [Bug preprocessor/15307] New: Preprocessor ICE on invalid input nisse at lysator dot liu dot se
2004-05-06 6:58 ` [Bug preprocessor/15307] " nisse at lysator dot liu dot se
2004-05-06 14:25 ` bangerth at dealii dot org
2004-05-06 14:36 ` pinskia at gcc dot gnu dot org
2004-05-06 15:13 ` nisse at lysator dot liu dot se
2004-05-06 15:20 ` [Bug preprocessor/15307] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-06-06 3:57 ` giovannibajo at libero dot it
2004-06-22 8:09 ` mmitchel at gcc dot gnu dot org
2004-08-29 18:06 ` mmitchel at gcc dot gnu dot org
2004-10-23 21:34 ` [Bug preprocessor/15307] [3.3/3.4 " pinskia at gcc dot gnu dot org
2004-11-01 0:46 ` mmitchel at gcc dot gnu dot org
2005-05-19 17:40 ` mmitchel 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).