public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Your patch causes regression in the Fortran frontend
@ 2004-09-23 18:12 Richard Kenner
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Kenner @ 2004-09-23 18:12 UTC (permalink / raw)
  To: graham.stott; +Cc: fortran, gcc, tobias.schlueter

    Could this be related to the problem Kenner found yesterday with
    inlining and shared INTEGER_CST nodes being incorrectly modified
    during inlining?

Seems very highly unlikely to me since the problem I ran into should
only affect types that have variable bounds and I don't think Fortran
does that.  Also, that ICE is very specific.

In any event, I'm about to check in the fix for the problem I found,
so you'll know for sure then.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Your patch causes regression in the Fortran frontend
  2004-09-23 16:49   ` Graham Stott
@ 2004-09-23 23:55     ` Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2004-09-23 23:55 UTC (permalink / raw)
  To: Graham Stott; +Cc: Tobias SchlXter, gcc, GCC Fortran mailing list

On Thu, Sep 23, 2004 at 04:45:12PM +0100, Graham Stott wrote:
> Could this be related to the problem Kenner found yesterday with
> inlining and shared INTEGER_CST nodes being incorrectly modified
> during inlining?

Don't think so.  This is probably related to Andrew Pinski's PR
where optimization clears the ADDRESSABLE flag.


r~

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Your patch causes regression in the Fortran frontend
  2004-09-23 16:31 ` Tobias Schlüter
@ 2004-09-23 16:49   ` Graham Stott
  2004-09-23 23:55     ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Graham Stott @ 2004-09-23 16:49 UTC (permalink / raw)
  To: Tobias Schlüter
  Cc: Richard Henderson, gcc, GCC Fortran mailing list

Richard,

Could this be related to the problem Kenner found yesterday with
inlining and shared INTEGER_CST nodes being incorrectly modified
during inlining?

Graham

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Your patch causes regression in the Fortran frontend
  2004-09-21 18:22 Tobias Schlüter
@ 2004-09-23 16:31 ` Tobias Schlüter
  2004-09-23 16:49   ` Graham Stott
  0 siblings, 1 reply; 5+ messages in thread
From: Tobias Schlüter @ 2004-09-23 16:31 UTC (permalink / raw)
  To: Tobias Schlüter; +Cc: Richard Henderson, gcc, GCC Fortran mailing list

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Your patch causes regression in the Fortran frontend
@ 2004-09-21 18:22 Tobias Schlüter
  2004-09-23 16:31 ` Tobias Schlüter
  0 siblings, 1 reply; 5+ messages in thread
From: Tobias Schlüter @ 2004-09-21 18:22 UTC (permalink / raw)
  To: Richard Henderson, gcc, GCC Fortran mailing list


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:

FAIL: gfortran.fortran-torture/execute/contained_3.f90 compilation,  -O2
FAIL: gfortran.fortran-torture/execute/contained_3.f90 compilation,  -O3
-fomit-frame-pointer
FAIL: gfortran.fortran-torture/execute/contained_3.f90 compilation,  -O3
-fomit-frame-pointer -funroll-loops
FAIL: gfortran.fortran-torture/execute/contained_3.f90 compilation,  -O3
-fomit-frame-pointer -funroll-all-loops -finline-functions
FAIL: gfortran.fortran-torture/execute/contained_3.f90 compilation,  -O3 -g
FAIL: gfortran.fortran-torture/execute/contained_3.f90 compilation,  -Os
FAIL: gfortran.fortran-torture/execute/st_function.f90 compilation,  -O2
FAIL: gfortran.fortran-torture/execute/st_function.f90 compilation,  -O3
-fomit-frame-pointer
FAIL: gfortran.fortran-torture/execute/st_function.f90 compilation,  -O3
-fomit-frame-pointer -funroll-loops
FAIL: gfortran.fortran-torture/execute/st_function.f90 compilation,  -O3
-fomit-frame-pointer -funroll-all-loops -finline-functions
FAIL: gfortran.fortran-torture/execute/st_function.f90 compilation,  -O3 -g
FAIL: gfortran.fortran-torture/execute/st_function.f90 compilation,  -Os

I.e. all of these disappear if the above change is backed out.

Regards,
- Tobi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-09-23 20:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-23 18:12 Your patch causes regression in the Fortran frontend Richard Kenner
  -- strict thread matches above, loose matches on Subject: below --
2004-09-21 18:22 Tobias Schlüter
2004-09-23 16:31 ` Tobias Schlüter
2004-09-23 16:49   ` Graham Stott
2004-09-23 23:55     ` Richard Henderson

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).