Bug 31404 - [4.2 only] ICE len_trim(array) in initialization
Summary: [4.2 only] ICE len_trim(array) in initialization
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Paul Thomas
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2007-03-30 21:43 UTC by Vivek Rao
Modified: 2007-04-15 13:10 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-04-07 08:54:54


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vivek Rao 2007-03-30 21:43:32 UTC
U:\vrao\fortran>type xlen_trim.f90 
integer :: ic(1) = len_trim((/"a"/))
print*,"ic=",ic
end

U:\vrao\fortran>gfortran -v 
Using built-in specs.
Target: i386-pc-mingw32
Configured with: ../trunk/configure --prefix=/mingw --enable-languages=c,fortran --with-gmp=/home/coudert/local --disable-nls --with-ld=/mingw/bin/ld --with-as=/mingw/bin/as --disable-werror --enable-bootstrap --enable-threads --build=i386-pc-mingw32 --disable-shared --enable-libgomp
Thread model: win32
gcc version 4.3.0 20070329 (experimental)

U:\vrao\fortran>gfortran -W -Wall -pedantic-errors -std=f2003 -fbounds-check -Werror xlen_trim.f90 
xlen_trim.f90: In function 'MAIN__':
xlen_trim.f90:1: internal compiler error: in gfc_conv_array_initializer, at fortran/trans-array.c:3693
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Vivek Rao
Comment 1 Paul Thomas 2007-04-07 08:54:54 UTC
This is fixed by the patch that I submitted for PR29507.

Paul
Comment 2 Paul Thomas 2007-04-14 15:10:12 UTC
Subject: Bug 31404

Author: pault
Date: Sat Apr 14 15:09:57 2007
New Revision: 123815

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123815
Log:
2007-04-14 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29507
	PR fortran/31404
	* expr.c (scalarize_intrinsic_call): New function to
	scalarize elemental intrinsic functions in initialization
	expressions.
	(check_init_expr): Detect elemental intrinsic functions
	in initalization expressions and call previous.


2007-04-14 Paul Thomas <pault@gcc.gnu.org>

	PR fortran/29507
	PR fortran/31404
	* gfortran.dg/initialization_6.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/initialization_6.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/expr.c
    trunk/gcc/testsuite/ChangeLog

Comment 3 Paul Thomas 2007-04-15 13:10:34 UTC
Fixed on trunk

Paul