This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Your patch causes regression in the Fortran frontend


Tobias Schlüter wrote:
> The patch you submitted on Sept 13th,
> <http://gcc.gnu.org/ml/gcc-cvs/2004-09/msg00581.html>, with ChangeLog entry
> 
> 	PR tree-opt/10528
> 	* tree-inline.c (copy_body_r): Recompute bits for ADDR_EXPR,
> 	after copying its argument.
> 
> causes the following regressions in the Fortran frontend on i686-pc-linux:
...
> I.e. all of these disappear if the above change is backed out.
> 

Minimal testcase which breaks with your patch, but works if your patch is removed:
-------------------
program main
call f
contains
  subroutine f
    external g
    call g(5) ! changing 5 to i fixes ICE
  end subroutine f
end program main
-----------------

The problem seems to be the call to an external function from a contained
function which is being inlined.

Error message (this is from yesterday's CVS, but I didn't see any related
changes on gcc-cvs):
[tobi@marktplatz tests]$ gfortran cont.f90 -O2
unhandled expression in get_expr_operands():
 <const_decl 0xf6db9244
    type <integer_type 0xf6e23488 int4 public SI
        size <integer_cst 0xf6e20408 constant invariant 32>
        unit size <integer_cst 0xf6e20138 constant invariant 4>
        align 32 symtab 0 alias set -1 precision 32 min <integer_cst
0xf6e203d8 -2147483648> max <integer_cst 0xf6e203f0 2147483647>
        pointer_to_this <pointer_type 0xf6e0f000>>
    addressable VOID file cont.f90 line 6
    align 1 context <function_decl 0xf6db90e8 f> initial <integer_cst
0xf6db8108 5>>

cont.f90: In function 'MAIN__':
cont.f90:2: internal compiler error: internal error
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Hope this helps,
- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]