public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13836] New: Illegal instruction calling function pointer
@ 2004-01-23 18:43 sdowning at fame dot com
  2004-01-23 18:45 ` [Bug c++/13836] " sdowning at fame dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: sdowning at fame dot com @ 2004-01-23 18:43 UTC (permalink / raw)
  To: gcc-bugs

A coredump resulting from an illegal instruction occurs when calling a function
pointer corresponding to a function in a separate module that contains a static,
statically initialized (with non-zero values) array of characters.

The module driver.cc contains a static array of characters.  The macro
EXHIBIT_SYMPTOM can be set to 0 to cause the symptom to go away.

The symptom can also be suppressed by
1) Initializing the array to zero values
2) Moving the array before the driver function
3) Declaring the array global rather than static

The symptom in the test case only occurs in the debug build (see build_run.sh)
but in the larger program that precipitated the test case, the symptom occurs in
 non-debug builds as well.  I have been able to workaround this issue by making
sure any functions pointed to are defined at the end of the module.

-- 
           Summary: Illegal instruction calling function pointer
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sdowning at fame dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: powerpc-ibm-aix5.1.0.0
  GCC host triplet: powerpc-ibm-aix5.1.0.0
GCC target triplet: powerpc-ibm-aix5.1.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13836


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

end of thread, other threads:[~2004-01-27 15:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-23 18:43 [Bug c++/13836] New: Illegal instruction calling function pointer sdowning at fame dot com
2004-01-23 18:45 ` [Bug c++/13836] " sdowning at fame dot com
2004-01-23 18:52 ` pinskia at gcc dot gnu dot org
2004-01-24  0:14 ` [Bug target/13836] " pinskia at gcc dot gnu dot org
2004-01-26 15:01 ` sdowning at fame dot com
2004-01-26 18:31 ` dje at watson dot ibm dot com
2004-01-26 18:57 ` dje at watson dot ibm dot com
2004-01-26 21:47 ` sdowning at fame dot com
2004-01-26 22:07 ` dje at watson dot ibm dot com
2004-01-27 14:03 ` sdowning at fame dot com
2004-01-27 15:06 ` dje at gcc dot gnu dot org

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