Bug 19759 - ICE caused by an elemental character function
Summary: ICE caused by an elemental character function
Status: RESOLVED DUPLICATE of bug 19242
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: unknown
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-02 15:37 UTC by Vivek Rao
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vivek Rao 2005-02-02 15:37:46 UTC
Compiling the following code on Windows causes an ICE:

program xx
implicit none
write (*,*) tf_char((/.true./),"#")
contains
elemental function tf_char(tf,char_true) result(cc)
logical          , intent(in)  :: tf
character (len=*), intent(in)  :: char_true
character (len=len(char_true)) :: cc
! works if line above replaced with line below
! character (len=1) :: cc
cc = ""
end function tf_char
end program xx

gfortran -v -c -Wall -std=f95 --free-form xx_elem_bug.f 
Using built-in specs.
Configured with: ../gcc/configure --prefix=/mingw --enable-languages=c,f95
Thread model: win32
gcc version 4.0.0 20050120 (experimental)
 c:/programs/gfortran/bin/../libexec/gcc/i686-pc-mingw32/4.0.0/f951.exe 
xx_elem_bug.f -quiet -dumpbase xx_elem_bug.f -mtune=pentiumpro -auxbase 
xx_elem_bug -Wall -std=f95 -version -ffree-form -o C:\DOCUME~1\rao\LOCALS~1
\Temp/ccw5aaaa.s
GNU F95 version 4.0.0 20050120 (experimental) (i686-pc-mingw32)
	compiled by GNU C version 4.0.0 20050117 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
xx_elem_bug.f: In function 'tf_char':
xx_elem_bug.f:3: warning: unused variable 'tf'
xx_elem_bug.f: In function 'MAIN__':
xx_elem_bug.f:3: internal compiler error: in gfc_conv_function_call, at 
fortran/trans-expr.c:1104
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-02 19:13:44 UTC

*** This bug has been marked as a duplicate of 19242 ***