public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/49853] New: [x32] PIC doesn't work with external symbol
@ 2011-07-26 14:40 hjl.tools at gmail dot com
2011-07-26 18:04 ` [Bug target/49853] " uros at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-26 14:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49853
Summary: [x32] PIC doesn't work with external symbol
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
[hjl@gnu-6 gcc]$ cat /tmp/bar.c
typedef unsigned int Elf32_Addr;
extern void _start (void);
int
dl_main ( Elf32_Addr *user_entry)
{
if (*user_entry == (Elf32_Addr) _start)
return 0;
else
return 1;
}
[hjl@gnu-6 gcc]$ ./xgcc -B./ -S -O2 -fPIC /tmp/bar.c -mx32 -std=gnu99 -dp
/tmp/bar.c: In function ‘dl_main’:
/tmp/bar.c:10:1: error: unrecognizable insn:
(insn 6 5 7 3 (set (reg:SI 67)
(symbol_ref:SI ("_start") [flags 0x41] <function_decl 0x7faad972ff00
_start>)) /tmp/bar.c:6 -1
(nil))
/tmp/bar.c:10:1: internal compiler error: in extract_insn, at recog.c:2115
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-6 gcc]$
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/49853] [x32] PIC doesn't work with external symbol
2011-07-26 14:40 [Bug target/49853] New: [x32] PIC doesn't work with external symbol hjl.tools at gmail dot com
@ 2011-07-26 18:04 ` uros at gcc dot gnu.org
2011-07-26 19:29 ` hjl.tools at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: uros at gcc dot gnu.org @ 2011-07-26 18:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49853
--- Comment #1 from uros at gcc dot gnu.org 2011-07-26 18:03:59 UTC ---
Author: uros
Date: Tue Jul 26 18:03:54 2011
New Revision: 176798
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176798
Log:
PR target/47369
PR target/49853
* config/i386/i386.c (ix86_expand_move): Call convert_to_mode
if legitimize_tls_address returned operand in wrong mode. Allow
SImode and DImode symbolic operand for PIC. Call convert_to_mode
if legitimize_pic_address returned operand in wrong mode.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/49853] [x32] PIC doesn't work with external symbol
2011-07-26 14:40 [Bug target/49853] New: [x32] PIC doesn't work with external symbol hjl.tools at gmail dot com
2011-07-26 18:04 ` [Bug target/49853] " uros at gcc dot gnu.org
@ 2011-07-26 19:29 ` hjl.tools at gmail dot com
2011-07-26 19:35 ` ubizjak at gmail dot com
2011-07-26 19:37 ` hjl.tools at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-26 19:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49853
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ubizjak at gmail dot com
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-26 19:29:01 UTC ---
Another testcase:
[hjl@gnu-6 ilp32-10]$ cat x.i
typedef struct FILE FILE;
int _fwalk(int (*)(FILE *));
int __sflush(FILE *);
int
fflush(FILE *fp)
{
return (_fwalk(__sflush));
}
[hjl@gnu-6 ilp32-10]$ make
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -S -o x.s -mx32 -O2 -g -fPIC
-dp x.i
x.i: In function ‘fflush’:
x.i:8:1: internal compiler error: in simplify_subreg, at simplify-rtx.c:5417
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [x.s] Error 1
[hjl@gnu-6 ilp32-10]$
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/49853] [x32] PIC doesn't work with external symbol
2011-07-26 14:40 [Bug target/49853] New: [x32] PIC doesn't work with external symbol hjl.tools at gmail dot com
2011-07-26 18:04 ` [Bug target/49853] " uros at gcc dot gnu.org
2011-07-26 19:29 ` hjl.tools at gmail dot com
@ 2011-07-26 19:35 ` ubizjak at gmail dot com
2011-07-26 19:37 ` hjl.tools at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2011-07-26 19:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49853
--- Comment #3 from Uros Bizjak <ubizjak at gmail dot com> 2011-07-26 19:34:47 UTC ---
(In reply to comment #2)
> Another testcase:
This is PR47372.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/49853] [x32] PIC doesn't work with external symbol
2011-07-26 14:40 [Bug target/49853] New: [x32] PIC doesn't work with external symbol hjl.tools at gmail dot com
` (2 preceding siblings ...)
2011-07-26 19:35 ` ubizjak at gmail dot com
@ 2011-07-26 19:37 ` hjl.tools at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2011-07-26 19:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49853
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-26 19:37:09 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-07-26 19:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-26 14:40 [Bug target/49853] New: [x32] PIC doesn't work with external symbol hjl.tools at gmail dot com
2011-07-26 18:04 ` [Bug target/49853] " uros at gcc dot gnu.org
2011-07-26 19:29 ` hjl.tools at gmail dot com
2011-07-26 19:35 ` ubizjak at gmail dot com
2011-07-26 19:37 ` hjl.tools at gmail dot com
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).