Skip to content

Commit ae9a270

Browse files
Blackhexgithub-actions
authored andcommitted
0003-Cygwin-handle-dllimport-properly-in-medium-model-V2.patch
1 parent 98a65d4 commit ae9a270

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gcc/config/i386/predicates.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@
215215
switch (XINT (XEXP (op, 0), 1))
216216
{
217217
case UNSPEC_GOTPCREL:
218+
if (TARGET_PECOFF) break;
218219
case UNSPEC_DTPOFF:
219220
case UNSPEC_GOTNTPOFF:
220221
case UNSPEC_NTPOFF:
@@ -320,6 +321,10 @@
320321
if (ix86_force_load_from_GOT_p (op))
321322
return false;
322323

324+
/* Dll-imported symbols are always external. */
325+
if (TARGET_DLLIMPORT_DECL_ATTRIBUTES && SYMBOL_REF_DLLIMPORT_P (op))
326+
return false;
327+
323328
/* For certain code models, the symbolic references are known to fit. */
324329
return (ix86_cmodel == CM_SMALL
325330
|| (ix86_cmodel == CM_MEDIUM

0 commit comments

Comments
 (0)