public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/34982]  New: [4.3 regression] calling a function with undefined parameters causes segmentation fault at -O1 or higher
@ 2008-01-26 17:41 bero at arklinux dot org
  2008-01-26 19:05 ` [Bug target/34982] " rguenth at gcc dot gnu dot org
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: bero at arklinux dot org @ 2008-01-26 17:41 UTC (permalink / raw)
  To: gcc-bugs

The following (admittedly ugly) piece of code works on older gccs, and
segfaults on 4.3:


#include <assert.h>
#include <string.h>

static void something();

int main(int argc, char **argv) {
        something("test");
}

static void something(const char *whatever) {
        assert(!strcmp(whatever, "test"));
}



Changing the initial declaration of something() to static void something(char
*whatever) makes the problem go away.


-- 
           Summary: [4.3 regression] calling a function with undefined
                    parameters causes segmentation fault at -O1 or higher
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bero at arklinux dot org
 GCC build triplet: i586-pc-linux-gnu
  GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu


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


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

end of thread, other threads:[~2008-01-31  8:22 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-26 17:41 [Bug c/34982] New: [4.3 regression] calling a function with undefined parameters causes segmentation fault at -O1 or higher bero at arklinux dot org
2008-01-26 19:05 ` [Bug target/34982] " rguenth at gcc dot gnu dot org
2008-01-26 19:20 ` rguenth at gcc dot gnu dot org
2008-01-26 19:22 ` rguenth at gcc dot gnu dot org
2008-01-26 19:36 ` rguenth at gcc dot gnu dot org
2008-01-26 21:56 ` hubicka at ucw dot cz
2008-01-27 15:35 ` hubicka at ucw dot cz
2008-01-27 17:21 ` rguenth at gcc dot gnu dot org
2008-01-27 18:20 ` hubicka at ucw dot cz
2008-01-27 19:40 ` hubicka at ucw dot cz
2008-01-27 19:57 ` bero at arklinux dot org
2008-01-29 19:46 ` hubicka at ucw dot cz
2008-01-29 23:22 ` jakub at gcc dot gnu dot org
2008-01-30  5:06 ` tromey at gcc dot gnu dot org
2008-01-30 15:06 ` steven at gcc dot gnu dot org
2008-01-30 16:05 ` hubicka at gcc dot gnu dot org
2008-01-30 16:12 ` hubicka at gcc dot gnu dot org
2008-01-30 16:22 ` hubicka at ucw dot cz
2008-01-30 23:19 ` dominiq at lps dot ens dot fr
2008-01-30 23:20 ` dominiq at lps dot ens dot fr
2008-01-30 23:21 ` pinskia at gcc dot gnu dot org
2008-01-31  0:06 ` dominiq at lps dot ens dot fr
2008-01-31  0:26 ` pinskia at gcc dot gnu dot org
2008-01-31  1:30 ` hubicka at ucw dot cz
2008-01-31  9:39 ` ubizjak at gmail dot com

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