public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Auto-import problem
@ 2009-06-03 10:56 Piotr Wyderski
  2009-06-03 12:42 ` Dave Korn
  0 siblings, 1 reply; 2+ messages in thread
From: Piotr Wyderski @ 2009-06-03 10:56 UTC (permalink / raw)
  To: gcc

Trying to work-around PR40269 (which doesn't happen
anymore on trunk, so you may close it) I've commented
out the dllexport/dllimport section:

    #define BASE_DLLEXPORT          /*__declspec(dllexport)*/
    #define BASE_DLLIMPORT          /*__declspec(dllimport)*/

Then the program compiled successfully, emitting a lot
of auto-import warning messages, but crashed unexpectedly
somewhere in the middle of execution. If these __declspecs
are uncommented, then it works correctly, as expected. Is
it a known auto-import bug or "feature" I should be aware of,
or should I dig deeper into the subject and ask out a debbugger
for a passionate afternoon session?

Best regards
Piotr Wyderski

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Auto-import problem
  2009-06-03 10:56 Auto-import problem Piotr Wyderski
@ 2009-06-03 12:42 ` Dave Korn
  0 siblings, 0 replies; 2+ messages in thread
From: Dave Korn @ 2009-06-03 12:42 UTC (permalink / raw)
  To: Piotr Wyderski; +Cc: gcc

Piotr Wyderski wrote:
> Trying to work-around PR40269 (which doesn't happen
> anymore on trunk, so you may close it) I've commented
> out the dllexport/dllimport section:
> 
>     #define BASE_DLLEXPORT          /*__declspec(dllexport)*/
>     #define BASE_DLLIMPORT          /*__declspec(dllimport)*/
> 
> Then the program compiled successfully, emitting a lot
> of auto-import warning messages, but crashed unexpectedly
> somewhere in the middle of execution. If these __declspecs
> are uncommented, then it works correctly, as expected. Is
> it a known auto-import bug or "feature" I should be aware of,
> or should I dig deeper into the subject and ask out a debbugger
> for a passionate afternoon session?

  You deleted correct code, ignored all the warnings, and got a crashing
executable.  Is that a bug?  I can't be sure without seeing your full
testcase, but I'd guess not.  Auto-import is something of a best-effort
last-resort fallback.  It cannot handle everything that properly annotating
the source code can handle.

  See the section of the ld manual documenting `--enable-auto-import' for the
full and gory details.  Does passing --enable-runtime-pseudo-reloc to the
linker help any in this case?

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-03 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-03 10:56 Auto-import problem Piotr Wyderski
2009-06-03 12:42 ` Dave Korn

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).