This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/59679] gcc version 4.7.3 and gcc version 4.5.3 cause an unaligned access exception on NetBSD/Alpha
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 28 Jan 2014 16:54:14 +0000
- Subject: [Bug tree-optimization/59679] gcc version 4.7.3 and gcc version 4.5.3 cause an unaligned access exception on NetBSD/Alpha
- Auto-submitted: auto-generated
- References: <bug-59679-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59679
UroÅ Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Component|target |tree-optimization
Target Milestone|--- |4.7.4
--- Comment #13 from UroÅ Bizjak <ubizjak at gmail dot com> ---
Confirmed as tree-optimization problem on 4.9 branch.
The compiler was build as a crosscompiler from x86_64-linux-gnu to
alpha-linux-gnu, configured with "configure --target=alpha-linux-gnu".
The preprocessed source from comment 12 is compiled with:
a) gcc-build-alpha/gcc/cc1 -O2 -fno-tree-ter -fpreprocessed
scope-reduced-preprocessed.c
b) gcc-build-alpha/gcc/cc1 -O2 -fpreprocessed scope-reduced-preprocessed.c
where a) creates correct binary (scope-reduced.s) and b) creates wrong binary
(scope-reduced_.s).
The difference between scope-reduced.s (correct) and scope-reduced_.s (wrong):
--- scope-reduced.s 2014-01-28 17:45:07.803092987 +0100
+++ scope-reduced_.s 2014-01-28 17:44:50.365312704 +0100
@@ -16,7 +16,7 @@
$Perl_leave_scope..ng:
lda $30,-16($30)
cpys $f31,$f31,$f31
- mov $31,$5
+ mov $31,$6
ldl $1,48($16)
mov $31,$8
stq $26,0($30)
@@ -33,10 +33,10 @@
s8addq $2,$1,$1
ldq $3,0($1)
and $3,63,$18
- cmpule $18,4,$6
- bne $6,$L3
+ cmpule $18,4,$5
+ bne $5,$L3
cmpule $18,20,$2
- ldq $5,-8($1)
+ ldq $6,-8($1)
beq $2,$L4
lda $2,-8($1)
$L5:
@@ -65,14 +65,12 @@
br $31,$L5
.align 4
$L17:
- sll $3,48,$3
- ldq_u $1,0($5)
- sra $3,56,$3
- mskbl $1,$5,$1
- insbl $3,$5,$3
+ extbl $3,1,$3
+ ldl $1,0($6)
+ bic $1,255,$1
cpys $f31,$f31,$f31
bis $3,$1,$3
- stq_u $3,0($5)
+ stl $3,0($6)
ldl $1,48($16)
cmplt $17,$1,$2
bne $2,$L12
@@ -84,24 +82,24 @@
$L9:
ldl $2,12($8)
ldl $1,48($16)
- bis $5,$2,$2
+ bis $6,$2,$2
stl $2,12($8)
br $31,$L2
.align 4
$L8:
ldq $3,0($16)
ldq $22,24($16)
- ldq $4,0($5)
+ ldq $4,0($6)
bis $31,$31,$31
mov $2,$1
- ldq $6,0($7)
+ ldq $5,0($7)
subq $3,$22,$2
cpys $f31,$f31,$f31
sra $2,3,$2
stq $2,16($4)
ldq $4,16($7)
- ldq $3,24($6)
- ldq $2,16($6)
+ ldq $3,24($5)
+ ldq $2,16($5)
stq $4,24($16)
s8addq $3,$4,$3
stq $7,184($16)
The problem can be seen just after $L17 label.