This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53296] Segfault on non-constant character array constructor containing kind spec
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 May 2012 17:22:43 +0000
- Subject: [Bug fortran/53296] Segfault on non-constant character array constructor containing kind spec
- Auto-submitted: auto-generated
- References: <bug-53296-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53296
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
CC| |burnus at gcc dot gnu.org
Known to fail| |4.6.1, 4.8.0
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-05-09 17:22:43 UTC ---
It also doesn't segfault if one replaces the call by:
call rou( [character(len=120) :: "123",uCase("abcde"),uCase("ghij")])
Namely: adding as first item in the constructor list a string literal (which by
construction has a known length).
According to VALGRIND, the problem is an
Invalid free() / delete / delete[] / realloc()
in line 10 or, if commented, in line 9. Line 9 is the "call rou" line.
With ifort 12.1, the programs seems to work while with cryftn it fails at run
time with an illegal instruction. In any case, the program looks valid to me.