User account creation filtered due to spam.

Bug 34359 - [4.3 Regression] ICE in December 6 version of gfortran when compiling a file with two routines that contain INCLUDE statements
Summary: [4.3 Regression] ICE in December 6 version of gfortran when compiling a file ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 34377 34401 (view as bug list)
Depends on:
Blocks: 32834 33739
  Show dependency treegraph
 
Reported: 2007-12-06 15:30 UTC by Michael Richmond
Modified: 2007-12-09 05:25 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-12-06 17:13:56


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Richmond 2007-12-06 15:30:11 UTC
I downloaded the December 6 version of gfortran from http://quatramaran.ens.fr/~coudert/gfortran/gfortran-linux.tar.gz and attempted to compile the following file:

SUBROUTINE f1
INCLUDE "anything"
END SUBROUTINE f1
SUBROUTINE f2
INCLUDE "anything"
END SUBROUTINE f2

The INCLUDE file can contain anything. I got the following message:

f.f90:1: internal compiler error: in change_file, at fortran/scanner.c:322
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Tobias Burnus 2007-12-06 17:13:55 UTC
Known, but not yet fixed. See:
http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00260.html
Comment 2 Bernhard Reutner-Fischer 2007-12-07 10:33:56 UTC
*** Bug 34377 has been marked as a duplicate of this bug. ***
Comment 3 Jakub Jelinek 2007-12-08 21:00:20 UTC
Subject: Bug 34359

Author: jakub
Date: Sat Dec  8 21:00:06 2007
New Revision: 130712

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130712
Log:
	PR fortran/34359
	* gfortran.h (gfc_file): Remove sibling and down fields.
	* scanner.c (file_changes, file_changes_cur, file_changes_count,
	file_changes_allocated): New variables.
	(add_file_change, report_file_change): New functions.
	(change_file): Remove.
	(gfc_start_source_files, gfc_end_source_files): Call
	report_file_change instead of change_file.
	(gfc_advance_line): Call report_file_change instead of change_file,
	call it even if lb->file == lb->next->file.
	(get_file): Revert last changes.
	(preprocessor_line): Call add_file_change when entering or leaving
	a file.
	(load_file): Likewise.  Set file_change[...].lb for all newly added
	file changes.

	* gfortran.dg/include_1.f90: New test.
	* gfortran.dg/include_1.inc: New.
	* gfortran.dg/include_2.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/include_1.f90
    trunk/gcc/testsuite/gfortran.dg/include_1.inc
    trunk/gcc/testsuite/gfortran.dg/include_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/scanner.c
    trunk/gcc/testsuite/ChangeLog

Comment 4 Jakub Jelinek 2007-12-08 21:02:25 UTC
Fixed.
Comment 5 Andrew Pinski 2007-12-09 05:25:44 UTC
*** Bug 34401 has been marked as a duplicate of this bug. ***