public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/71053] [6/7 Regression] Volatile read optimized into endless loop
       [not found] <bug-71053-4@http.gcc.gnu.org/bugzilla/>
@ 2016-05-12  9:49 ` bseifert at gmx dot at
  0 siblings, 0 replies; only message in thread
From: bseifert at gmx dot at @ 2016-05-12  9:49 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 5365 bytes --]

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71053

Berni <bseifert at gmx dot at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bseifert at gmx dot at

--- Comment #3 from Berni <bseifert at gmx dot at> ---
I also reproduced the bug after building the avr gcc 6.1.0 tool chain.

if you wait for the ADC to complete a measurement, you use the following code:

while (ADCSRA & _BV(ADSC));

which looks like the following after the post processor:

while ((*(volatile uint8_t *)(0x7A)) & (1 << (6)));

which looks fine, but it compiles to:

    3c38:       80 91 7a 00     lds     r24, 0x007A
    3c3c:       80 74           andi    r24, 0x40       ; 64
    3c3e:       81 11           cpse    r24, r1
    3c40:       fe cf           rjmp    .-4             ; 0x3c3e <main+0x12>

this is an endless loop. It does not respect the volatile keyword.
>From gcc-bugs-return-524919-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu May 12 09:51:19 2016
Return-Path: <gcc-bugs-return-524919-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 109790 invoked by alias); 12 May 2016 09:51:19 -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 109760 invoked by uid 89); 12 May 2016 09:51:18 -0000
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.5 required=5.0 testsºYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,URI_HEX autolearn=no version=3.3.2 spammy=thanking, directory*, lib1funcs.S, UD:vis
X-HELO: foss.arm.com
Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 May 2016 09:51:07 +0000
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])	by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DB3FC3A;	Thu, 12 May 2016 02:51:18 -0700 (PDT)
Received: from [10.2.206.43] (e100706-lin.cambridge.arm.com [10.2.206.43])	by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7FD5C3F21A;	Thu, 12 May 2016 02:51:05 -0700 (PDT)
Message-ID: <57345207.90909@foss.arm.com>
Date: Thu, 12 May 2016 09:51:00 -0000
From: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version: 1.0
To: RaghuShankar <mcsraghu@gmail.com>, gcc-bugs@gcc.gnu.org
Subject: Re: GCC 6.1.0 ARM cross compiling xgcc error not producing output file from .S files
References: <1463046398779-1262876.post@n5.nabble.com>
In-Reply-To: <1463046398779-1262876.post@n5.nabble.com>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-SW-Source: 2016-05/txt/msg01091.txt.bz2
Content-length: 2113

Hi,

On 12/05/16 10:46, RaghuShankar wrote:
> Hi,
>
> I am trying to cross compile the latest gcc 6.1.0 to arm architecture.
>
> At the end of libgcc compilation i am getting the error
> *"root/embeddedlinux/gcc/armcrosstool/arm-linux-gnueabi/bin/ar:
> _thumb1_case_sqi.o: No such file or directory"*
>
> *But when i cross checked libgcc compilation it has compiled the
> "_thumb1_case_sqi.dep" file and tried to create .o file but it is not? Hence
> the error.*
>
> /root/embeddedlinux/gcc/gcc-6.1.0/build/./gcc/xgcc
> -B/root/embeddedlinux/gcc/gcc-6.1.0/build/./gcc/
> -B/root/embeddedlinux/gcc/armcrosstool/arm-linux-gnueabi/bin/
> -B/root/embeddedlinux/gcc/armcrosstool/arm-linux-gnueabi/lib/ -isystem
> /root/embeddedlinux/gcc/armcrosstool/arm-linux-gnueabi/include -isystem
> /root/embeddedlinux/gcc/armcrosstool/arm-linux-gnueabi/sys-include    -g -O2
> -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing
> -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
> -Wold-style-definition  -isystem ./include   -fPIC -fno-inline -g
> -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -fPIC
> -fno-inline   -DUSE_EMUTLS -o _thumb1_case_sqi.o -MT _thumb1_case_sqi.o -MD
> -MP -MF _thumb1_case_sqi.dep -DL_thumb1_case_sqi -xassembler-with-cpp -c
> ../../../libgcc/config/arm/lib1funcs.S -include _thumb1_case_sqi.vis
>
> For further error information please check the attached error file.
> gcc-6.txt <http://gcc.1065356.n5.nabble.com/file/n1262876/gcc-6.txt>
>
> If any body having solution please let us know.

This list is for the automatic emails generated by the GCC bug tracker.
It's unlikely that people will find your post.

Try gcc-help@gcc.gnu.org.

If you think you have found a bug in GCC please report it according to the
instructions at https://gcc.gnu.org/bugs/

Cheers,
Kyrill

> Thanking you
>
>
>
>
>
>
> --
> View this message in context: http://gcc.1065356.n5.nabble.com/GCC-6-1-0-ARM-cross-compiling-xgcc-error-not-producing-output-file-from-S-files-tp1262876.html
> Sent from the gcc - bugs mailing list archive at Nabble.com.
>


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-12  9:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-71053-4@http.gcc.gnu.org/bugzilla/>
2016-05-12  9:49 ` [Bug target/71053] [6/7 Regression] Volatile read optimized into endless loop bseifert at gmx dot at

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