public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/51356] New: [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32
@ 2011-11-30 15:24 dominiq at lps dot ens.fr
2011-11-30 17:29 ` [Bug tree-optimization/51356] " jakub at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-11-30 15:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51356
Bug #: 51356
Summary: [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90
-O3 (internal compiler error) on
powerpc-apple-darwin9 with -m32
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dominiq@lps.ens.fr
CC: iains@gcc.gnu.org, irar@gcc.gnu.org, jakub@gcc.gnu.org
Host: powerpc-apple-darwin9
Target: powerpc-apple-darwin9
Build: powerpc-apple-darwin9
Between revisions 181105 (OK) and 181301, the following tests have started to
fail on powerpc-apple-darwin9 with -m32:
FAIL: gfortran.dg/anyallcount_1.f90 -O3 -fomit-frame-pointer (internal
compiler error)
FAIL: gfortran.dg/anyallcount_1.f90 -O3 -fomit-frame-pointer (test for excess
errors)
WARNING: gfortran.dg/anyallcount_1.f90 -O3 -fomit-frame-pointer compilation
failed to produce executable
FAIL: gfortran.dg/anyallcount_1.f90 -O3 -fomit-frame-pointer -funroll-loops
(internal compiler error)
FAIL: gfortran.dg/anyallcount_1.f90 -O3 -fomit-frame-pointer -funroll-loops
(test for excess errors)
WARNING: gfortran.dg/anyallcount_1.f90 -O3 -fomit-frame-pointer -funroll-loops
compilation failed to produce executable
FAIL: gfortran.dg/anyallcount_1.f90 -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions (internal compiler error)
FAIL: gfortran.dg/anyallcount_1.f90 -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions (test for excess errors)
WARNING: gfortran.dg/anyallcount_1.f90 -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions compilation failed to produce executable
FAIL: gfortran.dg/anyallcount_1.f90 -O3 -g (internal compiler error)
FAIL: gfortran.dg/anyallcount_1.f90 -O3 -g (test for excess errors)
WARNING: gfortran.dg/anyallcount_1.f90 -O3 -g compilation failed to produce
executable
This can be reproduced with '-O2 -ftree-vectorize' on the following reduced
test:
program main
implicit none
character(len=*), parameter :: f='(3L1)'
character(len=*), parameter :: g='(3I1)'
real, dimension(3,3) :: a
logical(kind=8), dimension(3,3) :: m8
character(len=3) :: res
data a /-1.0, -2.0, -3.0, 2.0, 1.0, -2.1, 1.0, 2.0, 3.0 /
m8 = a > 0
write (unit=res,fmt=f) any(m8,dim=1)
if (res /= 'FTT') call abort
write (unit=res,fmt=f) any(m8,dim=2)
if (res /= 'TTT') call abort
write (unit=res,fmt=f) all(m8,dim=1)
if (res /= 'FFT') call abort
write (unit=res,fmt=f) all(m8,dim=2)
if (res /= 'FFF') call abort
write (unit=res,fmt=g) count(m8,dim=1)
if (res /= '023') call abort
write (unit=res,fmt=g) count(m8,dim=2)
if (res /= '221') call abort
end program main
[karma] /Users/dominiq% gfc -O2 -ftree-vectorize anyallcount_1_red.f90
anyallcount_1_red.f90: In function 'MAIN__':
anyallcount_1_red.f90:2:0: internal compiler error: Bus error
The backtrace I get is
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x0000000c
0x0085eaac in vect_analyze_data_refs_alignment (loop_vinfo=<value temporarily
unavailable, due to optimizations>, bb_vinfo=0x0) at tree-vectorizer.h:333
333 && (loop->inner == (gimple_bb (stmt))->loop_father));
(gdb) bt
#0 0x0085eaac in vect_analyze_data_refs_alignment (loop_vinfo=<value
temporarily unavailable, due to optimizations>, bb_vinfo=0x0) at
tree-vectorizer.h:333
#1 0x0085ea68 in vect_analyze_data_refs_alignment (loop_vinfo=<value
temporarily unavailable, due to optimizations>, bb_vinfo=0x0) at
../../work/gcc/tree-vect-data-refs.c:806
The 'Bus error' is triggered by any of the WRITE statements.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51356] [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32
2011-11-30 15:24 [Bug tree-optimization/51356] New: [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32 dominiq at lps dot ens.fr
@ 2011-11-30 17:29 ` jakub at gcc dot gnu.org
2011-11-30 18:19 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-11-30 17:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51356
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|powerpc-apple-darwin9 |powerpc-*-*
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-11-30
Host|powerpc-apple-darwin9 |
Ever Confirmed|0 |1
Build|powerpc-apple-darwin9 |
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51356] [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32
2011-11-30 15:24 [Bug tree-optimization/51356] New: [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32 dominiq at lps dot ens.fr
2011-11-30 17:29 ` [Bug tree-optimization/51356] " jakub at gcc dot gnu.org
@ 2011-11-30 18:19 ` jakub at gcc dot gnu.org
2011-12-01 8:32 ` iains at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-11-30 18:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51356
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-30 17:28:47 UTC ---
Created attachment 25956
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25956
gcc47-pr51356.patch
The problem is that PowerPC returns a TImode vector from
get_vectype_for_scalar_type of DImode boolean/integer type.
vect_recog_bool_pattern sees a store of a DImode boolean, attempts to optimize
it but doesn't just create the pattern stmts etc., but also already changes
DR_STMT. Later on in vect_pattern_recog_1
if (VECTOR_MODE_P (TYPE_MODE (type_in)))
is unfortunately not true (while type_in is a vector, it doesn't have vector
mode) and thus the caller thinks type_in is a scalar type, but
get_vectype_for_scalar_type on it fails, therefore vect_mark_pattern_stmts
isn't called, yet DR_STMT has been already adjusted.
This patch fixes it by giving up in that case already in
vect_recog_bool_pattern. Alternative would be to check for VECTOR_TYPE in
vect_pattern_recog_1 instead of testing for vector mode? Not sure how useful
that would be though, I doubt we could actually vectorize it anyway.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51356] [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32
2011-11-30 15:24 [Bug tree-optimization/51356] New: [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32 dominiq at lps dot ens.fr
2011-11-30 17:29 ` [Bug tree-optimization/51356] " jakub at gcc dot gnu.org
2011-11-30 18:19 ` jakub at gcc dot gnu.org
@ 2011-12-01 8:32 ` iains at gcc dot gnu.org
2011-12-01 14:57 ` dominiq at lps dot ens.fr
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: iains at gcc dot gnu.org @ 2011-12-01 8:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51356
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> 2011-12-01 08:31:57 UTC ---
works for me on top of 181853 (powerpc-darwin9).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51356] [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32
2011-11-30 15:24 [Bug tree-optimization/51356] New: [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32 dominiq at lps dot ens.fr
` (2 preceding siblings ...)
2011-12-01 8:32 ` iains at gcc dot gnu.org
@ 2011-12-01 14:57 ` dominiq at lps dot ens.fr
2011-12-01 19:15 ` jakub at gcc dot gnu.org
2011-12-01 19:18 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-12-01 14:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51356
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-12-01 14:57:13 UTC ---
> works for me on top of 181853 (powerpc-darwin9).
For me too on top of 181782 (powerpc-darwin9, regtested gcc and gfortran) and
181863 (x86_64-apple-darwin10, full regtest).
> ... I doubt we could actually vectorize it anyway.
The test was not vectorized before the patch nor after it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51356] [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32
2011-11-30 15:24 [Bug tree-optimization/51356] New: [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32 dominiq at lps dot ens.fr
` (3 preceding siblings ...)
2011-12-01 14:57 ` dominiq at lps dot ens.fr
@ 2011-12-01 19:15 ` jakub at gcc dot gnu.org
2011-12-01 19:18 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-01 19:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51356
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-01 19:14:06 UTC ---
Author: jakub
Date: Thu Dec 1 19:14:03 2011
New Revision: 181891
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181891
Log:
PR tree-optimization/51356
* tree-vect-patterns.c (vect_recog_bool_pattern): Give up if
vectype doesn't have VECTOR_MODE_P.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-patterns.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51356] [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32
2011-11-30 15:24 [Bug tree-optimization/51356] New: [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32 dominiq at lps dot ens.fr
` (4 preceding siblings ...)
2011-12-01 19:15 ` jakub at gcc dot gnu.org
@ 2011-12-01 19:18 ` jakub at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-01 19:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51356
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-01 19:16:53 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-12-01 19:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-30 15:24 [Bug tree-optimization/51356] New: [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90 -O3 (internal compiler error) on powerpc-apple-darwin9 with -m32 dominiq at lps dot ens.fr
2011-11-30 17:29 ` [Bug tree-optimization/51356] " jakub at gcc dot gnu.org
2011-11-30 18:19 ` jakub at gcc dot gnu.org
2011-12-01 8:32 ` iains at gcc dot gnu.org
2011-12-01 14:57 ` dominiq at lps dot ens.fr
2011-12-01 19:15 ` jakub at gcc dot gnu.org
2011-12-01 19:18 ` jakub at gcc dot gnu.org
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).