public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/26092]  New: ICE on const function pointer assigned to malloc
@ 2006-02-03 17:18 kohler at cs dot ucla dot edu
  2006-02-03 17:18 ` [Bug c/26092] " kohler at cs dot ucla dot edu
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: kohler at cs dot ucla dot edu @ 2006-02-03 17:18 UTC (permalink / raw)
  To: gcc-bugs

Compiling this source causes an ICE on the call to (*f)(3).  Preprocessed
source in an attachment, non-preprocessed source below.  The ICE doesn't happen
if "f" is assigned to a user function poiner.  The segmentation fault happens
on either Linux (4.0.3 20051201 Debian prerelease) or Mac OS X (4.0.0 Apple
build), and I couldn't find a bugzilla bug for it.

Source:

#include <stdlib.h>

void *(* const f)(size_t) = malloc;

void *gg(void) {
    return (*f)(3);
}

Output of "gcc -v -save-temps -c x.c":

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)
 /usr/lib/gcc/i486-linux-gnu/4.0.3/cc1 -E -quiet -v x.c -mtune=i486
-fpch-preprocess -o x.i
ignoring nonexistent directory "/usr/local/include/i486-linux-gnu"
ignoring nonexistent directory "/usr/include/i486-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc/i486-linux-gnu/4.0.3/include
 /usr/include
End of search list.
 /usr/lib/gcc/i486-linux-gnu/4.0.3/cc1 -fpreprocessed x.i -quiet -dumpbase x.c
-mtune=i486 -auxbase x -version -o x.s
GNU C version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5) (i486-linux-gnu)
        compiled by GNU C version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5).
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=113175
x.c: In function 'gg':
x.c:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.


-- 
           Summary: ICE on const function pointer assigned to malloc
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kohler at cs dot ucla dot edu
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


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


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

end of thread, other threads:[~2006-02-28 22:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-03 17:18 [Bug c/26092] New: ICE on const function pointer assigned to malloc kohler at cs dot ucla dot edu
2006-02-03 17:18 ` [Bug c/26092] " kohler at cs dot ucla dot edu
2006-02-03 18:15 ` [Bug middle-end/26092] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-02-03 18:19 ` [Bug middle-end/26092] [4.0/4.1/4.2 Regression] ICE on const function pointer assigned to a builtin function pinskia at gcc dot gnu dot org
2006-02-03 18:23 ` pinskia at gcc dot gnu dot org
2006-02-08 12:19 ` jakub at gcc dot gnu dot org
2006-02-13 21:28 ` jakub at gcc dot gnu dot org
2006-02-13 21:29 ` jakub at gcc dot gnu dot org
2006-02-13 21:42 ` [Bug middle-end/26092] [4.0 " pinskia at gcc dot gnu dot org
2006-02-27 20:29 ` mmitchel at gcc dot gnu dot org
2006-02-28 20:09 ` jakub at gcc dot gnu dot org
2006-02-28 22:20 ` pinskia 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).