Bug 20239 - [3.4 Regression] ICE on empty preprocessed input
Summary: [3.4 Regression] ICE on empty preprocessed input
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 3.4.3
: P3 minor
Target Milestone: 3.4.5
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: ice-on-valid-code
: 25726 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-27 22:24 UTC by lalle
Modified: 2006-01-09 16:34 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work: 3.3.3 4.0.0
Known to fail: 3.4.0 3.4.4
Last reconfirmed: 2005-02-27 22:29:13


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lalle 2005-02-27 22:24:51 UTC
When feeding a preprocessed input file consisting of only a newline to gcc, it
gets a segmentation fault:

snaga:tmp> rm -f test.i
snaga:tmp> echo > test.i
snaga:tmp> gcc test.i
test.i:1: 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.
Comment 1 Andrew Pinski 2005-02-27 22:29:13 UTC
Confirmed, only happens in 3.4.x.
Comment 2 Richard Biener 2005-09-09 11:57:57 UTC
Obvious patch submitted.
Comment 3 Richard Biener 2005-09-09 13:37:12 UTC
Fixed.
Comment 4 GCC Commits 2005-09-09 13:37:19 UTC
Subject: Bug 20239

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	rguenth@gcc.gnu.org	2005-09-09 13:37:07

Modified files:
	gcc            : ChangeLog cppinit.c 

Log message:
	2005-09-09  Richard Guenther  <rguenther@suse.de>
	
	PR c/20239
	* cppinit.c (cpp_read_main_file): Avoid segfaulting on
	NULL pfile->map.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.916&r2=2.2326.2.917
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cppinit.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.297.6.6&r2=1.297.6.7

Comment 5 Richard Biener 2006-01-09 16:34:44 UTC
*** Bug 25726 has been marked as a duplicate of this bug. ***