public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/19708] New: tree optimizer doesn't meet asm constraints
@ 2005-01-30 10:47 amodra at bigpond dot net dot au
2005-01-30 10:48 ` [Bug tree-optimization/19708] " amodra at bigpond dot net dot au
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-01-30 10:47 UTC (permalink / raw)
To: gcc-bugs
Found when attempting to compile powerpc64-linux glibc using current mainline gcc,
the attached cut-down testcase results in
tcboff.i: In function 'dummy':
tcboff.i:24: warning: asm operand 0 probably doesn't match constraints
tcboff.i:24: error: impossible constraint in 'asm'
--
Summary: tree optimizer doesn't meet asm constraints
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amodra at bigpond dot net dot au
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: powerpc*-linux, i686-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19708
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/19708] tree optimizer doesn't meet asm constraints
2005-01-30 10:47 [Bug tree-optimization/19708] New: tree optimizer doesn't meet asm constraints amodra at bigpond dot net dot au
@ 2005-01-30 10:48 ` amodra at bigpond dot net dot au
2005-01-30 10:48 ` amodra at bigpond dot net dot au
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-01-30 10:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From amodra at bigpond dot net dot au 2005-01-30 10:47 -------
Created an attachment (id=8106)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8106&action=view)
testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19708
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/19708] tree optimizer doesn't meet asm constraints
2005-01-30 10:47 [Bug tree-optimization/19708] New: tree optimizer doesn't meet asm constraints amodra at bigpond dot net dot au
2005-01-30 10:48 ` [Bug tree-optimization/19708] " amodra at bigpond dot net dot au
@ 2005-01-30 10:48 ` amodra at bigpond dot net dot au
2005-01-30 14:08 ` [Bug middle-end/19708] [4.0 Regression] fold does not fold "&int_cst->a" pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: amodra at bigpond dot net dot au @ 2005-01-30 10:48 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|powerpc*-linux, i686-linux |
GCC target triplet| |powerpc*-linux, i686-linux
Known to work| |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19708
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/19708] [4.0 Regression] fold does not fold "&int_cst->a"
2005-01-30 10:47 [Bug tree-optimization/19708] New: tree optimizer doesn't meet asm constraints amodra at bigpond dot net dot au
2005-01-30 10:48 ` [Bug tree-optimization/19708] " amodra at bigpond dot net dot au
2005-01-30 10:48 ` amodra at bigpond dot net dot au
@ 2005-01-30 14:08 ` pinskia at gcc dot gnu dot org
2005-01-30 14:14 ` [Bug middle-end/19708] [4.0 Regression] does not fold "&int_cst->a" to just INT_CST pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-30 14:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-30 14:08 -------
The problem is that we don't fold "&4294938544B->D.1116.header.multiple_threads" to the offset but
I remember there was a reason why we don't.
The reason why this works in 3.4.4 is that we "fold' that in the front-end before getting anywhere.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|tree-optimization |middle-end
Ever Confirmed| |1
GCC target triplet|powerpc*-linux, i686-linux |
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2005-01-30 14:08:31
date| |
Summary|tree optimizer doesn't meet |[4.0 Regression] fold does
|asm constraints |not fold "&int_cst->a"
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19708
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/19708] [4.0 Regression] does not fold "&int_cst->a" to just INT_CST
2005-01-30 10:47 [Bug tree-optimization/19708] New: tree optimizer doesn't meet asm constraints amodra at bigpond dot net dot au
` (2 preceding siblings ...)
2005-01-30 14:08 ` [Bug middle-end/19708] [4.0 Regression] fold does not fold "&int_cst->a" pinskia at gcc dot gnu dot org
@ 2005-01-30 14:14 ` pinskia at gcc dot gnu dot org
2005-02-01 0:20 ` pinskia at gcc dot gnu dot org
2005-02-10 1:13 ` rth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-30 14:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-30 14:14 -------
The easiest fix would be to fold it in the front-end for all INT_CST's like the following with a slight
comment fix above:
Index: c-typeck.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v
retrieving revision 1.415
diff -u -p -r1.415 c-typeck.c
--- c-typeck.c 29 Jan 2005 16:12:38 -0000 1.415
+++ c-typeck.c 30 Jan 2005 14:13:00 -0000
@@ -2683,7 +2683,7 @@ build_unary_op (enum tree_code code, tre
when we have proper support for integer constant expressions. */
val = get_base_address (arg);
if (val && TREE_CODE (val) == INDIRECT_REF
- && integer_zerop (TREE_OPERAND (val, 0)))
+ && TREE_CODE (TREE_OPERAND (val, 0)) == INTEGER_CST)
return fold_convert (argtype, fold_offsetof (arg));
val = build1 (ADDR_EXPR, argtype, arg);
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0 Regression] fold does |[4.0 Regression] does not
|not fold "&int_cst->a" |fold "&int_cst->a" to just
| |INT_CST
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19708
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/19708] [4.0 Regression] does not fold "&int_cst->a" to just INT_CST
2005-01-30 10:47 [Bug tree-optimization/19708] New: tree optimizer doesn't meet asm constraints amodra at bigpond dot net dot au
` (3 preceding siblings ...)
2005-01-30 14:14 ` [Bug middle-end/19708] [4.0 Regression] does not fold "&int_cst->a" to just INT_CST pinskia at gcc dot gnu dot org
@ 2005-02-01 0:20 ` pinskia at gcc dot gnu dot org
2005-02-10 1:13 ` rth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-01 0:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-01 00:20 -------
: Search converges between 2004-08-30-trunk (#529) and 2004-08-31-trunk (#530).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19708
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/19708] [4.0 Regression] does not fold "&int_cst->a" to just INT_CST
2005-01-30 10:47 [Bug tree-optimization/19708] New: tree optimizer doesn't meet asm constraints amodra at bigpond dot net dot au
` (4 preceding siblings ...)
2005-02-01 0:20 ` pinskia at gcc dot gnu dot org
@ 2005-02-10 1:13 ` rth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-02-10 1:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2005-02-09 22:18 -------
Andrew, your patch is wrong; fold_offsetof assumes a zero base.
Alan, I have no particular interest in fixing this. See how the
alpha tcb-offsets.def file addresses this same problem.
If this turns out to be Absolutely Necessary, ie affects more than
just the nptl build, we can consider adding more hacks in this area
to accomodate, but at present I just don't think it's worth it.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19708
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-02-09 22:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-30 10:47 [Bug tree-optimization/19708] New: tree optimizer doesn't meet asm constraints amodra at bigpond dot net dot au
2005-01-30 10:48 ` [Bug tree-optimization/19708] " amodra at bigpond dot net dot au
2005-01-30 10:48 ` amodra at bigpond dot net dot au
2005-01-30 14:08 ` [Bug middle-end/19708] [4.0 Regression] fold does not fold "&int_cst->a" pinskia at gcc dot gnu dot org
2005-01-30 14:14 ` [Bug middle-end/19708] [4.0 Regression] does not fold "&int_cst->a" to just INT_CST pinskia at gcc dot gnu dot org
2005-02-01 0:20 ` pinskia at gcc dot gnu dot org
2005-02-10 1:13 ` rth at gcc dot gnu dot 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).