public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Tobias Schlüter" <tobias.schlueter@physik.uni-muenchen.de>
To: "Tobias Schlüter" <tobias.schlueter@physik.uni-muenchen.de>
Cc: Richard Henderson <rth@redhat.com>,
	gcc@gcc.gnu.org, GCC Fortran mailing list <fortran@gcc.gnu.org>
Subject: Re: Your patch causes regression in the Fortran frontend
Date: Thu, 23 Sep 2004 16:31:00 -0000	[thread overview]
Message-ID: <4152E765.1060702@physik.uni-muenchen.de> (raw)
In-Reply-To: <41505234.2070602@physik.uni-muenchen.de>

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

  reply	other threads:[~2004-09-23 15:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-21 18:22 Tobias Schlüter
2004-09-23 16:31 ` Tobias Schlüter [this message]
2004-09-23 16:49   ` Graham Stott
2004-09-23 23:55     ` Richard Henderson
2004-09-23 18:12 Richard Kenner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4152E765.1060702@physik.uni-muenchen.de \
    --to=tobias.schlueter@physik.uni-muenchen.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).