From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27942 invoked by alias); 21 Nov 2010 12:19:10 -0000 Received: (qmail 27932 invoked by uid 22791); 21 Nov 2010 12:19:09 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 21 Nov 2010 12:19:03 +0000 From: "oleg.steblev at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/46588] New: Segfault on automatic function X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: oleg.steblev at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Sun, 21 Nov 2010 12:59:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-11/txt/msg02620.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D46588 Summary: Segfault on automatic function Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: oleg.steblev@gmail.com $ cat check.f90 program ds implicit none character(len =3D 4) :: ins =3D '+ - ' character(len =3D 20) st, aufun=20 st =3D aufun(ins) ! =D1=80=D0=B5=D0=B7=D1=83=D0=BB=D1=8C=D1=82=D0=B0=D1=82= =D0=B0 =D1=80=D0=B0=D0=B2=D0=BD=D0=B0 n print *, st end function aufun(pm) character(len =3D *) pm character(len =3D *) aufun character(len =3D len(aufun)) temp=20 temp =3D pm // pm //pm // pm=20 aufun =3D '# ' // trim(temp) // ' #' end $ gfortran -v check.f90 Target: i686-pc-cygwin compiled by GNU C version 4.3.2 20080827 (beta) 2, GMP version 4.2.4, MPFR version 2.4.1. GGC heuristics: --param ggc-min-expand=3D100 --param ggc-min-heapsize=3D131= 072 check.f90:7: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See for instructions. $cat check2.f90 function aufun(pm) character(len =3D *) pm character(len =3D *) aufun SAVE character(len =3D len(aufun)) temp=20 temp =3D pm // pm //pm // pm=20 aufun =3D '# ' // trim(temp) // ' #' end $ gfortran check2.f90 check2.f90:4.15: SAVE character(len =3D len(afun)) temp ! \xD1\xF2\xF0\xEE\xEA\xE0 temp - \xEF\xF0\xE8\xEC\xE5\xF0 1 Error: Syntax error in SAVE statement at (1) check2.f90:5.8: temp =3D pm // pm //pm // pm ! \xE0\xE2\xF2\xEE\xEC\xE0\xF2\xE8\xF7\xE5\xF1\xEA\xEE\xE3\xEE \xEE\xE1\xFA\xE5\xEA xF2\xE0 \xE4\xE0\xED\xED\xFB\xF5 1 Error: Can't convert CHARACTER(1) to REAL(4) at (1) check2.f90:6.23: aufun =3D '# ' // trim(temp) // ' #' 1 Error: 'string' argument of 'trim' intrinsic at (1) must be CHARACTER