public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "juan-antonio.garcia@nabla-designs.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/65716] New: Integral promotion wrong with arm version
Date: Thu, 09 Apr 2015 15:18:00 -0000 [thread overview]
Message-ID: <bug-65716-4@http.gcc.gnu.org/bugzilla/> (raw)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65716
Bug ID: 65716
Summary: Integral promotion wrong with arm version
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: juan-antonio.garcia@nabla-designs.com
Created attachment 35277
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35277&action=edit
Compiler output to gcc -v -save-temps
test.c:
int main()
{
char a =-1;
int b = a;
while(b>0);
return 0;
}
This program has different behaviour in i386 and arm architectures.
i386 : The program exits normally.
arm : The program loops for ever because evaluates b > 0.
******************************************************************
test.i:
# 1 "test.c"
# 1 "<interno>"
# 1 "<línea-de-orden>"
# 1 "test.c"
int main()
{
char a =-1;
int b = a;
while(b>0);
return 0;
}
********************************************************************
test.s:
.syntax unified
.arch armv7-a
.eabi_attribute 27, 3
.fpu vfpv3-d16
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 6
.eabi_attribute 34, 1
.eabi_attribute 18, 4
.thumb
.file "test.c"
.text
.align 2
.global main
.thumb
.thumb_func
.type main, %function
main:
@ args = 0, pretend = 0, frame = 8
@ frame_needed = 1, uses_anonymous_args = 0
@ link register save eliminated.
push {r7}
sub sp, sp, #12
add r7, sp, #0
mov r3, #255
strb r3, [r7, #7]
ldrb r3, [r7, #7] @ zero_extendqisi2
str r3, [r7, #0]
.L2:
ldr r3, [r7, #0]
cmp r3, #0
bgt .L2
mov r3, #0
mov r0, r3
add r7, r7, #12
mov sp, r7
pop {r7}
bx lr
.size main, .-main
.ident "GCC: (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3"
.section .note.GNU-stack,"",%progbits
>From gcc-bugs-return-483156-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 09 15:19:14 2015
Return-Path: <gcc-bugs-return-483156-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 34271 invoked by alias); 9 Apr 2015 15:19:14 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 34224 invoked by uid 48); 9 Apr 2015 15:19:11 -0000
From: "ro at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug go/65717] 64-bit runtime FAILs with 32-bit compiler
Date: Thu, 09 Apr 2015 15:19:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: go
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ro at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ian at airs dot com
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: target_milestone
Message-ID: <bug-65717-4-8kWCxyzV2W@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65717-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65717-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-04/txt/msg00708.txt.bz2
Content-length: 284
https://gcc.gnu.org/bugzilla/show_bug.cgi?ide717
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |5.0
next reply other threads:[~2015-04-09 15:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-09 15:18 juan-antonio.garcia@nabla-designs.com [this message]
2015-04-09 16:41 ` [Bug c/65716] " jakub at gcc dot gnu.org
2015-04-10 5:16 ` juan-antonio.garcia@nabla-designs.com
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=bug-65716-4@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).