Hi, the following code fails to compile with Tobias Burnus' snapshot of trunk:
Character Function gfcbug89 (path) Character(len=*), Intent(in) :: path gfcbug89 = "" If (Len_Trim (path) < 1) Return gfcbug89 = path(1:1) ! This assignment makes gfortran 4.5 error out End Function gfcbug89 % gfc4x -g -c gfcbug89.f90 /tmp/ccmKoGIh.s: Assembler messages: /tmp/ccmKoGIh.s:44: Error: unknown .loc sub-directive `discriminator' /tmp/ccmKoGIh.s:44: Error: junk at end of line, first unrecognized character is `1' % gfc4x -g -fbounds-check -c gfcbug89.f90 /tmp/ccMBdSjB.s: Assembler messages: /tmp/ccMBdSjB.s:52: Error: unknown .loc sub-directive `discriminator' /tmp/ccMBdSjB.s:52: Error: junk at end of line, first unrecognized character is `1' /tmp/ccMBdSjB.s:56: Error: unknown .loc sub-directive `discriminator' /tmp/ccMBdSjB.s:56: Error: junk at end of line, first unrecognized character is `1' /tmp/ccMBdSjB.s:69: Error: unknown .loc sub-directive `discriminator' /tmp/ccMBdSjB.s:69: Error: junk at end of line, first unrecognized character is `1' % gfc4x --version GNU Fortran (GCC) 4.5.0 20091008 (experimental) [trunk revision 152577] [...] % as --version GNU assembler (GNU Binutils; openSUSE 11.0) 2.18.50.20080409-11.1 Copyright 2007 Free Software Foundation, Inc. [...] This assembler was configured for a target of `x86_64-suse-linux'. I cannot read assembler for x86_64, but it appears that the lines 41-44 in the first case read: .loc 1 10 0 testl %eax, %eax jle .L1 .loc 1 10 0 is_stmt 0 discriminator 1 Any ideas? Cheers, -ha -- Summary: [Regression] Compilation failure with "-g": bad assembler? Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: anlauf at gmx dot de GCC host triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41640