This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/63793] -mcmodel=medium in gfortran on x86_64 emits references that are RIP relative (instead of using the GOT)


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63793

--- Comment #17 from howarth at bromo dot med.uc.edu ---
The only other place that looks promising is...

    case UNSPEC_GOTOFF:
      /* Refuse GOTOFF in 64bit mode since it is always 64bit when used.
         While ABI specify also 32bit relocation but we don't produce it in
         small PIC model at all.  */
      if ((GET_CODE (XVECEXP (disp, 0, 0)) == SYMBOL_REF
           || GET_CODE (XVECEXP (disp, 0, 0)) == LABEL_REF)
          && !TARGET_64BIT)
        return !TARGET_PECOFF && gotoff_operand (XVECEXP (disp, 0, 0), Pmode);
      return false;

in gcc/config/i386/i386.c. As I understand the problem, we need to expand the
existing code to treat -mcmodel=small in the current manner but
-mcmodel=medium/large needs to switch to GOT.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]