public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/29841]  New: ICE: on function pointer call.
@ 2006-11-15  5:48 raj dot khem at gmail dot com
  2006-11-15  5:58 ` [Bug c/29841] " pinskia at gcc dot gnu dot org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: raj dot khem at gmail dot com @ 2006-11-15  5:48 UTC (permalink / raw)
  To: gcc-bugs

The following example (reduced from openssl) causes GCC 4.2 to ICE when -O2 is
used it works ok with -O1. It does not ICE with GCC 4.1 as well with 3.4.6

gcc -c -O2 xxx.c

xxx.c: In function 'foo':
xxx.c:8: warning: function called through a non-compatible type
xxx.c:8: note: if this code is reached, the program will abort
xxx.c:9: internal compiler error: Segmentation fault


xxx.c
============================
typedef void (*fp)(void);
extern char* bar(void* a1, int a2);
extern char* mar(int n);
char* cptr;
void foo()
{
  cptr = mar(6);
  ((char *(*)(void *,int (*)(void *,unsigned char **),char
**))((fp)bar))(0,0,(void*)(0));
}


-- 
           Summary: ICE: on function pointer call.
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: raj dot khem at gmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu


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


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

end of thread, other threads:[~2007-05-17 17:15 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-15  5:48 [Bug regression/29841] New: ICE: on function pointer call raj dot khem at gmail dot com
2006-11-15  5:58 ` [Bug c/29841] " pinskia at gcc dot gnu dot org
2006-11-15  6:17 ` [Bug regression/29841] " raj dot khem at gmail dot com
2006-11-15  8:46 ` [Bug regression/29841] [4.2/4.3 regression] ICE with scheduling and __builtin_trap pinskia at gcc dot gnu dot org
2006-11-15  8:47 ` [Bug rtl-optimization/29841] " pinskia at gcc dot gnu dot org
2006-11-25 23:52 ` pinskia at gcc dot gnu dot org
2006-11-25 23:53 ` pinskia at gcc dot gnu dot org
2006-12-19 13:33 ` mkuvyrkov at gcc dot gnu dot org
2006-12-19 13:39 ` jh at suse dot cz
2006-12-19 14:00 ` mkuvyrkov at gcc dot gnu dot org
2006-12-19 14:12 ` jh at suse dot cz
2006-12-19 15:24 ` mkuvyrkov at gcc dot gnu dot org
2007-01-04 12:10 ` pinskia at gcc dot gnu dot org
2007-01-26 17:40 ` pinskia at gcc dot gnu dot org
2007-02-09 20:01 ` pinskia at gcc dot gnu dot org
2007-02-09 20:38 ` colin at gibibit dot com
2007-02-13  7:35 ` mkuvyrkov at gcc dot gnu dot org
2007-02-13 10:15 ` patchapp at dberlin dot org
2007-02-19 20:42 ` mmitchel at gcc dot gnu dot org
2007-04-19 11:19 ` ebotcazou at gcc dot gnu dot org
2007-04-19 11:20 ` ebotcazou at gcc dot gnu dot org
2007-04-19 11:22 ` ebotcazou at gcc dot gnu dot org
2007-05-17 17:15 ` 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).