This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

new gcc bug


* the exact version of GCC; 
bash-2.04$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/specs
Configured with: ../gcc/configure --enable-languages=c,c++ --host=ia64-hp-hpux11.20 --target=ia64-hp-hpux11.20 --with-ld=/usr/ccs/bin/ld --with-gnu-as --enable-libstdcxx-v3 --disable-checking
Thread model: single
gcc version 3.2 20020329 (experimental)

* the system type; 
bash-2.04$ uname -a
HP-UX spe175 B.11.22 U ia64 0319544412 unlimited-user license

* the options given when GCC was configured/built; 
See above.

* the complete command line that triggers the bug; 
gcc bug.c
Given output:
bash-2.04$ ./a.out
q=4243519447

Expected output:
bash-2.04$ cc bug.c; ./a.out
q=60

* the compiler output (error messages, warnings, etc.); and 
No output.

* the preprocessed file (*.i*) that triggers the bug, ...
# 1 "bug.c"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "bug.c"
# 1 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 1 3 4
# 14 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
# 1 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdarg.h" 1 3 4
# 43 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 15 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 2 3 4






# 1 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/stdsyms.h" 1 3 4
# 22 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 2 3 4


# 1 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 1 3 4
# 50 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
# 1 "/usr/include/sys/_inttypes.h" 1 3 4
# 104 "/usr/include/sys/_inttypes.h" 3 4
typedef signed char int8_t;



typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;

typedef int intfast_t;
typedef unsigned int uintfast_t;




typedef long long int64_t;
typedef unsigned long long uint64_t;





typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
# 137 "/usr/include/sys/_inttypes.h" 3 4
typedef long intptr_t;
typedef unsigned long uintptr_t;
# 149 "/usr/include/sys/_inttypes.h" 3 4
typedef char int_least8_t;


typedef unsigned char uint_least8_t;


typedef int int_fast8_t;


typedef unsigned int uint_fast8_t;


typedef short int_least16_t;


typedef unsigned short uint_least16_t;


typedef int int_fast16_t;


typedef unsigned int uint_fast16_t;


typedef int int_least32_t;


typedef unsigned int uint_least32_t;


typedef int int_fast32_t;


typedef unsigned int uint_fast32_t;





typedef int64_t int_least64_t;


typedef int64_t int_fast64_t;


typedef uint64_t uint_least64_t;


typedef uint64_t uint_fast64_t;
# 214 "/usr/include/sys/_inttypes.h" 3 4
typedef uint32_t ptr32_t;

typedef uint64_t ptr64_t;
# 51 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 2 3 4
# 63 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
                typedef int mqd_t;





     typedef int32_t dev_t;





        typedef uint32_t ino32_t;






       typedef uint64_t ino64_t;
# 97 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
         typedef unsigned long ino_t;





     typedef uint16_t mode_t;




     typedef uint16_t nlink_t;




    typedef int32_t fpos32_t;





       typedef int64_t fpos64_t;









       typedef long fpos_t;






     typedef uint32_t fsblkcnt32_t;





       typedef uint64_t fsblkcnt64_t;
# 152 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
       typedef unsigned long fsblkcnt_t;





     typedef int32_t off32_t;




     typedef int32_t sbsize32_t;
     typedef uint32_t bsize32_t;





        typedef int64_t off64_t;






        typedef int64_t sbsize64_t;
        typedef uint64_t bsize64_t;
# 188 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
        typedef long off_t;
# 199 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
        typedef long sbsize_t;
        typedef unsigned long bsize_t;





     typedef uint32_t fsfilcnt32_t;





       typedef uint64_t fsfilcnt64_t;
# 222 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
        typedef unsigned long fsfilcnt_t;





     typedef int32_t blkcnt32_t;





       typedef int64_t blkcnt64_t;
# 244 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
        typedef long blkcnt_t;





     typedef int32_t pid_t;




     typedef int32_t lwpid_t;




     typedef int32_t gid_t;




     typedef int32_t uid_t;




     typedef int32_t tid_t;




        typedef long ssize_t;




     typedef uint16_t __site_t;




     typedef uint16_t __cnode_t;












                typedef long time_t;
# 308 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
typedef long unsigned int size_t;
# 317 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
     typedef uint32_t clock_t;







      typedef int32_t key_t;


   typedef unsigned short __ushort;

   typedef int32_t __daddr_t;
   typedef char *__caddr_t;
   typedef int32_t __swblk_t;






     typedef __caddr_t caddr_t;







     typedef int32_t id_t;




     typedef uint32_t useconds_t;






      typedef uint32_t rlim32_t;





        typedef uint64_t rlim64_t;
# 377 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
       typedef unsigned long rlim_t;




   typedef __site_t site_t;



   typedef unsigned char u_char;
   typedef unsigned short u_short;
   typedef unsigned int u_int;
   typedef unsigned long u_long;
   typedef unsigned int uint;
   typedef unsigned short ushort;
   typedef unsigned char ubit8;
   typedef unsigned short ubit16;
   typedef uint32_t ubit32;
   typedef char sbit8;
   typedef short sbit16;
   typedef int32_t sbit32;

   typedef __swblk_t swblk_t;
   typedef __daddr_t daddr_t;
   typedef __cnode_t cnode_t;


# 1 "/usr/include/machine/vm/vmtypes.h" 1 3 4
# 47 "/usr/include/machine/vm/vmtypes.h" 3 4
typedef uintptr_t paddr_t;
# 59 "/usr/include/machine/vm/vmtypes.h" 3 4
typedef intptr_t page_t;

typedef int64_t pgcnt_t;
typedef uint64_t upgcnt_t;
# 73 "/usr/include/machine/vm/vmtypes.h" 3 4
typedef uintptr_t physpfn_t;
typedef uintptr_t iophyspfn_t;
typedef uintptr_t pgaddr_t;

typedef uint32_t prot_t;
# 93 "/usr/include/machine/vm/vmtypes.h" 3 4
typedef uint64_t space_t;



typedef uint32_t rid_t;
# 405 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 2 3 4



   typedef unsigned long ulong_t;


   typedef int16_t cnt_t;
   typedef uint32_t cdno_t;
   typedef uint16_t use_t;

   typedef struct _physadr { intptr_t r[1]; } *physadr;

   typedef int spu_t;
   typedef int ldom_t;





     typedef short cpu_t;




typedef struct lkinfo {
       char *lk_name;
       int lk_flags;
       long lk_pad[2];
} lkinfo_t;

typedef unsigned long pl_t;



      typedef int32_t aid_t;
# 448 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
   typedef pid_t sid_t;
# 460 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
# 1 "/usr/include/sys/_fd_macros.h" 1 3 4
# 85 "/usr/include/sys/_fd_macros.h" 3 4
typedef int32_t __fd_mask;
# 94 "/usr/include/sys/_fd_macros.h" 3 4
   typedef struct fd_set {
     long fds_bits[(((2048)+(((sizeof(long) * 8))-1))/((sizeof(long) * 8)))];
     } fd_set;
# 461 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 2 3 4
# 469 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
     typedef __fd_mask fd_mask;
# 523 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/sys/types.h" 3 4
        typedef int32_t dir_off_t;
# 25 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 2 3 4
# 51 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4

   typedef struct {
        int __cnt;
        unsigned char *__ptr;
        unsigned char *__base;
        unsigned short __flag;
        unsigned char __fileL;
        unsigned char __fileH;
   } FILE;


   typedef struct {
        int __cnt;
        unsigned char *__ptr;
        unsigned char *__base;
        unsigned short __flag;
        unsigned char __fileL;
        unsigned char __fileH;
        unsigned char *__bufendp;
        unsigned char *__newbase;
        unsigned char __smbuf[8 +2*4];



        void *__unused;





        int __filler1;
        char __filler2[8];

   } _FILEX;
# 111 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
# 1 "/usr/include/sys/_null.h" 1 3 4
# 112 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 2 3 4



# 1 "/usr/include/sys/_size_t.h" 1 3 4
# 116 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 2 3 4
# 144 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
        typedef char * __va_list;
# 186 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
#pragma extern __iob

   extern FILE __iob[];





#pragma builtin fclose, fflush, scanf, fscanf, sscanf, fprintf 
#pragma builtin printf, sprintf, fgetc, fputc
#pragma extern remove, tmpnam, fclose, fflush, setbuf, setvbuf, fprintf
#pragma extern fscanf, printf, scanf, sprintf, sscanf, fgetc, fgets, fputc
#pragma extern fputs, getc, getchar, gets, putc, putchar, puts, ungetc
#pragma extern fseek, ftell, rewind, clearerr, feof, ferror, perror
# 259 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4

     extern int remove(const char *);



#pragma extern rename

     extern int rename(const char *, const char *);

     extern char *tmpnam(char *);
     extern int fclose(FILE *);
     extern int fflush(FILE *);
     extern void setbuf(FILE *, char *);
     extern int setvbuf(FILE *, char *, int, size_t);
     extern int fprintf(FILE *, const char *, ...);
     extern int fscanf(FILE *, const char *,...);
     extern int printf(const char *,...);
     extern int scanf(const char *,...);
     extern int sprintf(char *, const char *,...);
     extern int sscanf(const char *, const char *,...);
     extern int fgetc(FILE *);
     extern char *fgets(char *, int, FILE *);
     extern int fputc(int, FILE *);
     extern int fputs(const char *, FILE *);
     extern int getc(FILE *);
     extern int getchar(void);
     extern char *gets(char *);
     extern int putc(int, FILE *);
     extern int putchar(int);
     extern int puts(const char *);
     extern int ungetc(int, FILE *);



#pragma builtin fopen
#pragma extern tmpfile, fgetpos, fsetpos, fopen, freopen

     extern FILE *tmpfile(void);
     extern int fgetpos(FILE *, fpos_t *);
     extern int fsetpos(FILE *, const fpos_t *);
     extern FILE *fopen(const char *, const char *);
     extern FILE *freopen(const char *, const char *, FILE *);
# 310 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
     extern int fseek(FILE *, long int, int);
     extern long int ftell(FILE *);
     extern void rewind(FILE *);
     extern void clearerr(FILE *);
     extern int feof(FILE *);
     extern int ferror(FILE *);
     extern void perror(const char *);

# 408 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
#pragma extern fread, fwrite
# 423 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4

       extern size_t fread(void *, size_t, size_t, FILE *);
       extern size_t fwrite(const void *, size_t, size_t, FILE *);

# 442 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
#pragma extern __flsbuf, __filbuf 
# 453 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
     extern int __flsbuf(unsigned char, FILE *);
     extern int __filbuf(FILE *);
# 525 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
#pragma extern ctermid, fileno, fdopen 
# 536 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
     extern char *ctermid(char *);
     extern int fileno(FILE *);
     extern FILE *fdopen(int, const char *);
# 556 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4

           typedef char * __not_va_list__;

# 586 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
#pragma extern optarg, opterr, optind, optopt, getopt, cuserid


     extern char *optarg;
     extern int opterr;
     extern int optind;
     extern int optopt;
# 602 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
       extern int getopt(int, char * const [], const char *);
       extern char *cuserid(char *);
# 615 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
#pragma extern getw, putw, pclose, popen, tempnam
# 626 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
     extern int getw(FILE *);
     extern int putw(int, FILE *);
     extern int pclose(FILE *);
     extern FILE *popen(const char *, const char *);
     extern char *tempnam(const char *, const char *);
# 655 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
#pragma extern vprintf, vfprintf, vsprintf





     extern int vprintf(const char *, __gnuc_va_list);
     extern int vfprintf(FILE *, const char *, __gnuc_va_list);
     extern int vsprintf(char *, const char *, __gnuc_va_list);






# 679 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
#pragma builtin snprintf
#pragma extern snprintf, vsnprintf, vscanf, vfscanf, vsscanf, flockfile
#pragma extern ftrylockfile, funlockfile
# 699 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
     extern int snprintf(char *, size_t, const char *,...);
     extern int vsnprintf(char *, size_t, const char *, __gnuc_va_list);
     extern int vscanf(const char *, __gnuc_va_list);
     extern int vfscanf(FILE *, const char *, __gnuc_va_list);
     extern int vsscanf(char *, const char *, __gnuc_va_list);
     extern void flockfile(FILE *);
     extern int ftrylockfile(FILE *);
     extern void funlockfile(FILE *);
# 755 "/usr/local/lib/gcc-lib/ia64-hp-hpux11.20/3.2/include/stdio.h" 3 4
#pragma extern __bufendtab


   extern unsigned char *__bufendtab[];
# 2 "bug.c" 2

main()
{
  unsigned long c = 70423129, q;

  q = (~((unsigned long) 0)) / c;

  printf ("q=%lu\n", q);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]