Patchwork [testcase] Fix up maybe_cleanup_end_of_block (PR middle-end/46629)

login
register
mail settings
Submitter Jakub Jelinek
Date Nov. 24, 2010, 10:04 a.m.
Message ID <20101124100402.GC29412@tyan-ft48-01.lab.bos.redhat.com>
Download mbox | patch
Permalink /patch/72826/
State New
Headers show

Comments

Jakub Jelinek - Nov. 24, 2010, 10:04 a.m.
On Wed, Nov 24, 2010 at 09:59:34AM +0100, Jakub Jelinek wrote:
> On Tue, Nov 23, 2010 at 04:51:35PM -0800, H.J. Lu wrote:
> Committed as obvious, will deal with the testcase later.

And here is a testcase for that, not 100% sure if I got the dg-lto* stuff
right, but it works (and fails with unfixed gcc).  Ok for trunk?

2010-11-24  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/46629
	* gfortran.dg/lto/pr46629_0.f90: New test.



	Jakub
Richard Guenther - Nov. 24, 2010, 10:08 a.m.
On Wed, 24 Nov 2010, Jakub Jelinek wrote:

> On Wed, Nov 24, 2010 at 09:59:34AM +0100, Jakub Jelinek wrote:
> > On Tue, Nov 23, 2010 at 04:51:35PM -0800, H.J. Lu wrote:
> > Committed as obvious, will deal with the testcase later.
> 
> And here is a testcase for that, not 100% sure if I got the dg-lto* stuff
> right, but it works (and fails with unfixed gcc).  Ok for trunk?

dg-lto-do assemble will only produce lto bytecode but not do the
link step, if the ICE happened from f951 and not lto1 then this
is ok.

Richard.

> 2010-11-24  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR middle-end/46629
> 	* gfortran.dg/lto/pr46629_0.f90: New test.
> 
> --- gcc/testsuite/gfortran.dg/lto/pr46629_0.f90.jj	2010-11-24 10:42:09.285372916 +0100
> +++ gcc/testsuite/gfortran.dg/lto/pr46629_0.f90	2010-11-24 10:57:53.225261153 +0100
> @@ -0,0 +1,15 @@
> +! PR middle-end/64429
> +! { dg-lto-do assemble }
> +! { dg-lto-options {{ -O2 -flto -ftree-vectorize }} }
> +! { dg-lto-options {{ -O2 -flto -ftree-vectorize -march=x86-64 }} { target i?86-*-* x86_64-*-* } }
> +
> +subroutine foo
> +  character(len=6), save :: c
> +  real, save :: d(0:100)
> +  integer, save :: x, n, i
> +  n = x
> +  print *, c
> +  do i = 2, n
> +    d(i) = -d(i-1)
> +  end do
> +end
> 
> 
> 	Jakub
> 
>
Jakub Jelinek - Nov. 24, 2010, 10:17 a.m.
On Wed, Nov 24, 2010 at 11:08:55AM +0100, Richard Guenther wrote:
> On Wed, 24 Nov 2010, Jakub Jelinek wrote:
> 
> > On Wed, Nov 24, 2010 at 09:59:34AM +0100, Jakub Jelinek wrote:
> > > On Tue, Nov 23, 2010 at 04:51:35PM -0800, H.J. Lu wrote:
> > > Committed as obvious, will deal with the testcase later.
> > 
> > And here is a testcase for that, not 100% sure if I got the dg-lto* stuff
> > right, but it works (and fails with unfixed gcc).  Ok for trunk?
> 
> dg-lto-do assemble will only produce lto bytecode but not do the
> link step, if the ICE happened from f951 and not lto1 then this
> is ok.

It did.  I haven't understood what is the difference between -flto and
normal compilation, before *.vect the difference was just the function name
in the dump, but somehow with -flto vectorization happened while without it
it didn't.

	Jakub

Patch

--- gcc/testsuite/gfortran.dg/lto/pr46629_0.f90.jj	2010-11-24 10:42:09.285372916 +0100
+++ gcc/testsuite/gfortran.dg/lto/pr46629_0.f90	2010-11-24 10:57:53.225261153 +0100
@@ -0,0 +1,15 @@ 
+! PR middle-end/64429
+! { dg-lto-do assemble }
+! { dg-lto-options {{ -O2 -flto -ftree-vectorize }} }
+! { dg-lto-options {{ -O2 -flto -ftree-vectorize -march=x86-64 }} { target i?86-*-* x86_64-*-* } }
+
+subroutine foo
+  character(len=6), save :: c
+  real, save :: d(0:100)
+  integer, save :: x, n, i
+  n = x
+  print *, c
+  do i = 2, n
+    d(i) = -d(i-1)
+  end do
+end