Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 19708
Product:  
Component:  
Status: RESOLVED
Resolution: WONTFIX
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Alan Modra <amodra@gmail.com>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
tcboff.i testcase text/plain 2005-01-30 10:47 315 bytes Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 19708 depends on: Show dependency tree
Show dependency graph
Bug 19708 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2005-01-30 14:08 Opened: 2005-01-30 10:46
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'

------- Comment #1 From Alan Modra 2005-01-30 10:47 -------
Created an attachment (id=8106) [edit]
testcase

------- Comment #2 From Andrew Pinski 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.

------- Comment #3 From Andrew Pinski 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);

------- Comment #4 From Andrew Pinski 2005-02-01 00:20 -------
: Search converges between 2004-08-30-trunk (#529) and 2004-08-31-trunk (#530).

------- Comment #5 From Richard Henderson 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.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug