public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/60034] New: "invalid expression as operand" in aarch64 inline asm
@ 2014-02-02 22:10 kuganv at linaro dot org
2014-02-02 22:24 ` [Bug target/60034] " kuganv at linaro dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: kuganv at linaro dot org @ 2014-02-02 22:10 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: 4469 bytes --]
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60034
Bug ID: 60034
Summary: "invalid expression as operand" in aarch64 inline asm
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: kuganv at linaro dot org
Created attachment 32017
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32017&action=edit
pre processed source
This issue is originally reported in
https://bugs.launchpad.net/gcc-linaro/+bug/1270789
The attached pre-processed source fails with:
# aarch64-linux-gnu-gcc -std=gnu99 -fgnu89-inline -O -Wall -Winline
-Wwrite-strings -fmerge-all-constants -frounding-math -g -Wstrict-prototypes
malloc.i
malloc.c: In function â__libc_malloptâ:
malloc.c:4761:16: error: invalid 'asm': invalid expression as operand
Splitting this inline asm out into a smaller testcase does not seem to
reproduce the issue. It's possible this is a bug in the source file, but it's
not clear from gcc's output what the problem is.
Seems to be an issue with alignment calculation in
aarch64_classify_address.
for rtl of the form (lo_sum:DI (reg/f:DI 132)
(symbol_ref:DI ("*.LANCHOR4") [flags 0x182])) we are currently
calculating align of 8bits and due to this the following statement
returns false. This causes output_addr_const (in gcc/final.c) to fail.
return ((INTVAL (offs) & (ref_size - 1)) == 0
&& ((align / BITS_PER_UNIT) & (ref_size - 1)) == 0);
AFIK, align of 8bits is not correct here.
GCC version and config:
arm-none-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=/home/kugan/work/builds/gcc-fsf-trunk/tools/bin/arm-none-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/home/kugan/work/builds/gcc-fsf-trunk/tools/libexec/gcc/arm-none-linux-gnueabi/4.9.0/lto-wrapper
Target: arm-none-linux-gnueabi
Configured with: /home/kugan/work/sources/gcc-fsf/trunk/configure
--target=arm-none-linux-gnueabi
--prefix=/home/kugan/work/builds/gcc-fsf-trunk/tools
--with-sysroot=/home/kugan/work/builds/gcc-fsf-trunk/sysroot-arm-none-linux-gnueabi
--disable-libssp --disable-libgomp --disable-libmudflap
--enable-languages=c,c++ --with-arch=armv7-a --with-fpu=vfpv3-d16
--with-float=softfp --with-thumb
Thread model: posix
gcc version 4.9.0 20130922 (experimental) (GCC)
>From gcc-bugs-return-442334-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Feb 02 22:11:38 2014
Return-Path: <gcc-bugs-return-442334-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1975 invoked by alias); 2 Feb 2014 22:11:37 -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 1956 invoked by uid 48); 2 Feb 2014 22:11:34 -0000
From: "kuganv at linaro dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/60034] "invalid expression as operand" in aarch64 inline asm
Date: Sun, 02 Feb 2014 22:11:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: kuganv at linaro dot org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: attachments.created
Message-ID: <bug-60034-4-tE13BcMufL@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60034-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60034-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: 2014-02/txt/msg00091.txt.bz2
Content-length: 219
http://gcc.gnu.org/bugzilla/show_bug.cgi?id`034
--- Comment #1 from Kugan <kuganv at linaro dot org> ---
Created attachment 32018
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id2018&actioníit
Proposed patch
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/60034] "invalid expression as operand" in aarch64 inline asm
2014-02-02 22:10 [Bug target/60034] New: "invalid expression as operand" in aarch64 inline asm kuganv at linaro dot org
@ 2014-02-02 22:24 ` kuganv at linaro dot org
2014-02-02 23:38 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: kuganv at linaro dot org @ 2014-02-02 22:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60034
Kugan <kuganv at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kuganv at linaro dot org
--- Comment #2 from Kugan <kuganv at linaro dot org> ---
I am sorry that I entered wrong gcc -v (cut and paste error). It is an aarch64
issue and the correct gcc -v is below:
aarch64-none-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/home/kugan/work/builds/gcc-fsf-trunk/tools/bin/aarch64-none-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/home/kugan/work/builds/gcc-fsf-trunk/tools/libexec/gcc/aarch64-none-linux-gnu/4.9.0/lto-wrapper
Target: aarch64-none-linux-gnu
Configured with: /home/kugan/work/sources/gcc-fsf/trunk/configure
--target=aarch64-none-linux-gnu
--prefix=/home/kugan/work/builds/gcc-fsf-trunk/tools --without-headers
--with-newlib --disable-shared --disable-threads --disable-libssp
--disable-libgomp --disable-libmudflap --disable-libatomic
--without-libquadmath --disable-libquadmath --enable-languages=c
Thread model: single
gcc version 4.9.0 20130922 (experimental) (GCC)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/60034] "invalid expression as operand" in aarch64 inline asm
2014-02-02 22:10 [Bug target/60034] New: "invalid expression as operand" in aarch64 inline asm kuganv at linaro dot org
2014-02-02 22:24 ` [Bug target/60034] " kuganv at linaro dot org
@ 2014-02-02 23:38 ` pinskia at gcc dot gnu.org
2014-02-07 10:46 ` ramana at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2014-02-02 23:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60034
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Host|x86_64-unknown-linux-gnu |
Build|x86_64-unknown-linux-gnu |
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is a reduced testcase:
static unsigned long global_max_fast;
int __libc_mallopt (int param_number, int value)
{
__asm__ __volatile__ ("# %[_SDT_A2]" :: [_SDT_A2] "nor" ((global_max_fast)));
global_max_fast = 1;
}
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/60034] "invalid expression as operand" in aarch64 inline asm
2014-02-02 22:10 [Bug target/60034] New: "invalid expression as operand" in aarch64 inline asm kuganv at linaro dot org
2014-02-02 22:24 ` [Bug target/60034] " kuganv at linaro dot org
2014-02-02 23:38 ` pinskia at gcc dot gnu.org
@ 2014-02-07 10:46 ` ramana at gcc dot gnu.org
2014-02-07 10:47 ` ramana at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-02-07 10:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60034
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ramana at gcc dot gnu.org
--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
(In reply to Kugan from comment #1)
> Created attachment 32018 [details]
> Proposed patch
Please submit patches on gcc-patches@gcc.gnu.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/60034] "invalid expression as operand" in aarch64 inline asm
2014-02-02 22:10 [Bug target/60034] New: "invalid expression as operand" in aarch64 inline asm kuganv at linaro dot org
` (2 preceding siblings ...)
2014-02-07 10:46 ` ramana at gcc dot gnu.org
@ 2014-02-07 10:47 ` ramana at gcc dot gnu.org
2014-02-16 22:27 ` kuganv at linaro dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-02-07 10:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60034
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-02-07
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/60034] "invalid expression as operand" in aarch64 inline asm
2014-02-02 22:10 [Bug target/60034] New: "invalid expression as operand" in aarch64 inline asm kuganv at linaro dot org
` (3 preceding siblings ...)
2014-02-07 10:47 ` ramana at gcc dot gnu.org
@ 2014-02-16 22:27 ` kuganv at linaro dot org
2014-03-30 22:42 ` kugan at gcc dot gnu.org
2014-04-14 13:52 ` ramana at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: kuganv at linaro dot org @ 2014-02-16 22:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60034
--- Comment #5 from Kugan <kuganv at linaro dot org> ---
There is a rgression with this patch in qemu aarch64-none-linux-gnu for
pr38151.c.
pr38151.c:(.text+0x10c): relocation truncated to fit:
R_AARCH64_LDST64_ABS_LO12_NC against `.rodata'
collect2: error: ld returned 1 exit status
asm diff is as shown below.
< add x0, x0, :lo12:.LANCHOR0
< ldr x0, [x0]
---
> ldr x0, [x0,#:lo12:.LANCHOR0]
If I however increase the alignment of .rodata where .LANCHOR0 is
defined, this passes. Is alignment of BITS_PER_UNIT valid for
SYMBOL_REF? If I change it as I am doing this attached patch, is there
anything else I need to do. Any tips?
>From gcc-bugs-return-443856-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Feb 16 22:34:05 2014
Return-Path: <gcc-bugs-return-443856-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 388 invoked by alias); 16 Feb 2014 22:34:04 -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 367 invoked by uid 48); 16 Feb 2014 22:34:01 -0000
From: "antony at cosmologist dot info" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/60232] New: OOP False Error: The rank of the element in the structure constructor
Date: Sun, 16 Feb 2014 22:34:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: major
X-Bugzilla-Who: antony at cosmologist dot info
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-60232-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: 2014-02/txt/msg01613.txt.bz2
Content-length: 1224
http://gcc.gnu.org/bugzilla/show_bug.cgi?id`232
Bug ID: 60232
Summary: OOP False Error: The rank of the element in the
structure constructor
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: antony at cosmologist dot info
module defining inherited class
module Samples
use ObjectLists
implicit none
Type, extends(TObjectList):: TSampleList
contains
procedure :: ConfidVal => TSampleList_ConfidVal
end Type TSampleList
contains
subroutine TSampleList_ConfidVal(L)
Class(TSampleList) :: L
end subroutine TSampleList_ConfidVal
end module Samples
gives false compiler error:
<During initialization>
Error: The rank of the element in the structure constructor at (1) does not
match that of the component (1/0)
The code is valid and works in ifort (from CosmoMC package). The inherited
ObjectLists module is available at
http://gcc.gnu.org/bugzilla/attachment.cgi?id1394
(I have not yet been able to make a shorter single-file test case but did try.)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/60034] "invalid expression as operand" in aarch64 inline asm
2014-02-02 22:10 [Bug target/60034] New: "invalid expression as operand" in aarch64 inline asm kuganv at linaro dot org
` (4 preceding siblings ...)
2014-02-16 22:27 ` kuganv at linaro dot org
@ 2014-03-30 22:42 ` kugan at gcc dot gnu.org
2014-04-14 13:52 ` ramana at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: kugan at gcc dot gnu.org @ 2014-03-30 22:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60034
--- Comment #6 from kugan at gcc dot gnu.org ---
Author: kugan
Date: Sun Mar 30 22:41:59 2014
New Revision: 208949
URL: http://gcc.gnu.org/viewcvs?rev=208949&root=gcc&view=rev
Log:
PR target/60034
* aarch64/aarch64.c (aarch64_classify_address): Fix alignment for
section anchor.
PR target/60034
* gcc.target/aarch64/pr60034.c: New file.
Added:
trunk/gcc/testsuite/gcc.target/aarch64/pr60034.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/aarch64/aarch64.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/60034] "invalid expression as operand" in aarch64 inline asm
2014-02-02 22:10 [Bug target/60034] New: "invalid expression as operand" in aarch64 inline asm kuganv at linaro dot org
` (5 preceding siblings ...)
2014-03-30 22:42 ` kugan at gcc dot gnu.org
@ 2014-04-14 13:52 ` ramana at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-04-14 13:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60034
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |4.9.0
--- Comment #7 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Fixed on trunk for 4.9.0.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-04-14 13:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-02 22:10 [Bug target/60034] New: "invalid expression as operand" in aarch64 inline asm kuganv at linaro dot org
2014-02-02 22:24 ` [Bug target/60034] " kuganv at linaro dot org
2014-02-02 23:38 ` pinskia at gcc dot gnu.org
2014-02-07 10:46 ` ramana at gcc dot gnu.org
2014-02-07 10:47 ` ramana at gcc dot gnu.org
2014-02-16 22:27 ` kuganv at linaro dot org
2014-03-30 22:42 ` kugan at gcc dot gnu.org
2014-04-14 13:52 ` ramana 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).