Humpf, that one is scary... can't even think of what to put as a Summary :)

$ cat abs_complex.f90 
  real x
  x = abs(x)
  call foo(abs)
  end
$ ./bin/gfortran abs_complex.f90 -c
/tmp/ccdGqqDj.s: Assembler messages:
/tmp/ccdGqqDj.s:14: Error: junk `(intrinsic)__abs' after expression

Indeed, the assembler produced on i686-linux is not very nice; note the "movl
$__(intrinsic)__abs, (%esp)" line:

        .file   "abs_complex.f90"
        .text
.globl MAIN__
        .type   MAIN__, @function
MAIN__:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $40, %esp
        movl    $0, 8(%esp)
        movl    $127, 4(%esp)
        movl    $70, (%esp)
        call    _gfortran_set_std
        andb    $127, -1(%ebp)
        movl    $__(intrinsic)__abs, (%esp)
        call    foo_
        leave
        ret
        .size   MAIN__, .-MAIN__
        .ident  "GCC: (GNU) 4.2.0 20060510 (experimental)"
        .section        .note.GNU-stack,"",@progbits


-- 
           Summary: Strange assembler produced
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fxcoudert at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27554

Reply via email to