www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Issue 1042] New: internal compiler error: in output_pic_addr_const, at config/i386/i386.c:7023

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1042

           Summary: internal compiler error: in output_pic_addr_const, at
                    config/i386/i386.c:7023
           Product: DGCC aka GDC
           Version: 0.23
          Platform: PC
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P3
         Component: glue layer
        AssignedTo: dvdfrdmn users.sf.net
        ReportedBy: thomas-dloop kuehne.cn


#    byte b;
#
#    void main(){
#          asm{
#             mov EAX, offsetof b;
#          }
#    }

gdmd-4.0 -arch i386 -O  -c nocompile/a/asm_offset_01_B.d
nocompile/a/asm_offset_01_B.d: In function 'main':
nocompile/a/asm_offset_01_B.d:30: internal compiler error: in 
output_pic_addr_const, at config/i386/i386.c:7023
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.

test case:
http://dstress.kuehne.cn/nocompile/a/asm_offset_01_B.d


-- 
Mar 08 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1042


dvdfrdmn users.sf.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Comment #1 from dvdfrdmn users.sf.net  2007-03-10 16:16 -------
This is a side-effect of MacOS X generating PIC code by default.  'offset b' is
not valid for PIC code.  The solution is to compile with the -mdynamic-no-pic
option.


-- 
Mar 10 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1042





------- Comment #2 from thomas-dloop kuehne.cn  2007-03-12 00:29 -------
(In reply to comment #1)
 This is a side-effect of MacOS X generating PIC code by default.

Are there any reliable means to detect at compile time if PIC code is generated? --
Mar 11 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1042





------- Comment #3 from dvdfrdmn users.sf.net  2007-03-13 17:02 -------
 Are there any reliable means to detect at compile time if PIC code is
 generated?

Not yet. I can add something like version(PIC). --
Mar 13 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1042





------- Comment #4 from thomas-dloop kuehne.cn  2007-04-05 03:29 -------
(In reply to comment #3)
 Are there any reliable means to detect at compile time if PIC code is
 generated?

Not yet. I can add something like version(PIC).

That would be very usefull for me. --
Apr 05 2007