public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* gcc-3.1 ICE on ppc-linux, regression wrt 2.95
@ 2002-04-24  8:40 Michal Moskal
  2002-04-24  8:45 ` Michal Moskal
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Moskal @ 2002-04-24  8:40 UTC (permalink / raw)
  To: gcc

Following code, compiled with 'gcc -O2 -c' :

#define NULL 0
#define PATH_MAX 1024
extern int verbose;

int pkgdir_update(int *npatches) 
{
    char            foo[PATH_MAX], tmpath[PATH_MAX], path[PATH_MAX];
    char            *linebuf = NULL;
    int             line_size = 0, nread, nerr = 0;

    
    while ((nread = getline(&linebuf, &line_size, NULL)) > 0) {
        char *p;

        if ((p = strchr(p, ' ')) == NULL) {
            nerr++;
            break;
        }
        (*npatches)++;
    }
    

    if (*npatches == 0)         /* outdated and no patches */
       nerr++;

    if (nerr == 0) {
        if (vf_localdirpath(tmpath, sizeof(tmpath), path) < (int)sizeof(tmpath)) {
            verbose--; /* verbosity need to be reorganized... */
            rm_dir_files(tmpath);
           verbose++;
        }
        
        
    }
    
    return nerr == 0;
}

causes gcc 3.1 20020415 to ICE.

Reading specs from /usr/lib/gcc-lib/ppc-pld-linux/3.1/specs
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --enable-shared --enable-threads=posix
--enable-languages=c,c++,f77,gcov,java,objc,ksi,ada --enable-long-long
--enable-multilib --with-gnu-as --with-gnu-ld --with-system-zlib
--with-slibdir=/lib --without-x ppc-pld-linux
Thread model: posix
gcc version 3.1 20020415 (prerelease)

Example was destiled from bigger source (poldek pkg managment tool by
Pawel Gajda), I'm unable to cut it down.

It compiles fine with gcc 2.95.

-- 
: Michal Moskal :::::::: malekith/at/pld.org.pl :  GCS {C,UL}++++$ a? !tv
: PLD Linux ::::::: Wroclaw University, CS Dept :  {E-,w}-- {b++,e}>+++ h

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

end of thread, other threads:[~2002-04-24 16:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-24  8:40 gcc-3.1 ICE on ppc-linux, regression wrt 2.95 Michal Moskal
2002-04-24  8:45 ` Michal Moskal
2002-04-24  9:40   ` David Edelsohn

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