GCC Bugzilla – Attachment 46289 Details for
Bug 90348
[10/11/12/13 Regression] Partition of char arrays is incorrect in some cases
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Source file to reproduce the problem
test.i (text/plain), 31.90 KB, created by
Pieter Wuille
on 2019-05-04 18:57:12 UTC
(
hide
)
Description:
Source file to reproduce the problem
Filename:
MIME Type:
Creator:
Pieter Wuille
Created:
2019-05-04 18:57:12 UTC
Size:
31.90 KB
patch
obsolete
># 1 "test.c" ># 1 "<built-in>" ># 1 "<command-line>" ># 31 "<command-line>" ># 1 "/usr/include/stdc-predef.h" 1 3 4 ># 32 "<command-line>" 2 ># 1 "test.c" ># 1 "/usr/include/assert.h" 1 3 4 ># 35 "/usr/include/assert.h" 3 4 ># 1 "/usr/include/features.h" 1 3 4 ># 424 "/usr/include/features.h" 3 4 ># 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4 ># 427 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 ># 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 ># 428 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 ># 1 "/usr/include/x86_64-linux-gnu/bits/long-double.h" 1 3 4 ># 429 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 ># 425 "/usr/include/features.h" 2 3 4 ># 448 "/usr/include/features.h" 3 4 ># 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4 ># 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 ># 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4 ># 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4 ># 449 "/usr/include/features.h" 2 3 4 ># 36 "/usr/include/assert.h" 2 3 4 ># 66 "/usr/include/assert.h" 3 4 > > > > ># 69 "/usr/include/assert.h" 3 4 >extern void __assert_fail (const char *__assertion, const char *__file, > unsigned int __line, const char *__function) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); > > >extern void __assert_perror_fail (int __errnum, const char *__file, > unsigned int __line, const char *__function) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); > > > > >extern void __assert (const char *__assertion, const char *__file, int __line) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); > > > ># 2 "test.c" 2 ># 1 "/usr/include/stdio.h" 1 3 4 ># 27 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/x86_64-linux-gnu/bits/libc-header-start.h" 1 3 4 ># 28 "/usr/include/stdio.h" 2 3 4 > > > > > ># 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 ># 216 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 3 4 >typedef long unsigned int size_t; ># 34 "/usr/include/stdio.h" 2 3 4 > ># 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 ># 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 ># 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 ># 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 > > >typedef unsigned char __u_char; >typedef unsigned short int __u_short; >typedef unsigned int __u_int; >typedef unsigned long int __u_long; > > >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef signed short int __int16_t; >typedef unsigned short int __uint16_t; >typedef signed int __int32_t; >typedef unsigned int __uint32_t; > >typedef signed long int __int64_t; >typedef unsigned long int __uint64_t; > > > > > > > >typedef long int __quad_t; >typedef unsigned long int __u_quad_t; > > > > > > > >typedef long int __intmax_t; >typedef unsigned long int __uintmax_t; ># 130 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 ># 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4 ># 131 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 > > >typedef unsigned long int __dev_t; >typedef unsigned int __uid_t; >typedef unsigned int __gid_t; >typedef unsigned long int __ino_t; >typedef unsigned long int __ino64_t; >typedef unsigned int __mode_t; >typedef unsigned long int __nlink_t; >typedef long int __off_t; >typedef long int __off64_t; >typedef int __pid_t; >typedef struct { int __val[2]; } __fsid_t; >typedef long int __clock_t; >typedef unsigned long int __rlim_t; >typedef unsigned long int __rlim64_t; >typedef unsigned int __id_t; >typedef long int __time_t; >typedef unsigned int __useconds_t; >typedef long int __suseconds_t; > >typedef int __daddr_t; >typedef int __key_t; > > >typedef int __clockid_t; > > >typedef void * __timer_t; > > >typedef long int __blksize_t; > > > > >typedef long int __blkcnt_t; >typedef long int __blkcnt64_t; > > >typedef unsigned long int __fsblkcnt_t; >typedef unsigned long int __fsblkcnt64_t; > > >typedef unsigned long int __fsfilcnt_t; >typedef unsigned long int __fsfilcnt64_t; > > >typedef long int __fsword_t; > >typedef long int __ssize_t; > > >typedef long int __syscall_slong_t; > >typedef unsigned long int __syscall_ulong_t; > > > >typedef __off64_t __loff_t; >typedef char *__caddr_t; > > >typedef long int __intptr_t; > > >typedef unsigned int __socklen_t; > > > > >typedef int __sig_atomic_t; ># 36 "/usr/include/stdio.h" 2 3 4 ># 1 "/usr/include/x86_64-linux-gnu/bits/types/__FILE.h" 1 3 4 > > > >struct _IO_FILE; >typedef struct _IO_FILE __FILE; ># 37 "/usr/include/stdio.h" 2 3 4 ># 1 "/usr/include/x86_64-linux-gnu/bits/types/FILE.h" 1 3 4 > > > >struct _IO_FILE; > > >typedef struct _IO_FILE FILE; ># 38 "/usr/include/stdio.h" 2 3 4 > > > ># 1 "/usr/include/x86_64-linux-gnu/bits/libio.h" 1 3 4 ># 35 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 ># 1 "/usr/include/x86_64-linux-gnu/bits/_G_config.h" 1 3 4 ># 19 "/usr/include/x86_64-linux-gnu/bits/_G_config.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stddef.h" 1 3 4 ># 20 "/usr/include/x86_64-linux-gnu/bits/_G_config.h" 2 3 4 > ># 1 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 1 3 4 ># 13 "/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h" 3 4 >typedef struct >{ > int __count; > union > { > unsigned int __wch; > char __wchb[4]; > } __value; >} __mbstate_t; ># 22 "/usr/include/x86_64-linux-gnu/bits/_G_config.h" 2 3 4 > > > > >typedef struct >{ > __off_t __pos; > __mbstate_t __state; >} _G_fpos_t; >typedef struct >{ > __off64_t __pos; > __mbstate_t __state; >} _G_fpos64_t; ># 36 "/usr/include/x86_64-linux-gnu/bits/libio.h" 2 3 4 ># 53 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 ># 1 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 1 3 4 ># 40 "/usr/lib/gcc/x86_64-linux-gnu/7/include/stdarg.h" 3 4 >typedef __builtin_va_list __gnuc_va_list; ># 54 "/usr/include/x86_64-linux-gnu/bits/libio.h" 2 3 4 ># 149 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 >struct _IO_jump_t; struct _IO_FILE; > > > > >typedef void _IO_lock_t; > > > > > >struct _IO_marker { > struct _IO_marker *_next; > struct _IO_FILE *_sbuf; > > > > int _pos; ># 177 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 >}; > > >enum __codecvt_result >{ > __codecvt_ok, > __codecvt_partial, > __codecvt_error, > __codecvt_noconv >}; ># 245 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 >struct _IO_FILE { > int _flags; > > > > > char* _IO_read_ptr; > char* _IO_read_end; > char* _IO_read_base; > char* _IO_write_base; > char* _IO_write_ptr; > char* _IO_write_end; > char* _IO_buf_base; > char* _IO_buf_end; > > char *_IO_save_base; > char *_IO_backup_base; > char *_IO_save_end; > > struct _IO_marker *_markers; > > struct _IO_FILE *_chain; > > int _fileno; > > > > int _flags2; > > __off_t _old_offset; > > > > unsigned short _cur_column; > signed char _vtable_offset; > char _shortbuf[1]; > > > > _IO_lock_t *_lock; ># 293 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 > __off64_t _offset; > > > > > > > > void *__pad1; > void *__pad2; > void *__pad3; > void *__pad4; > > size_t __pad5; > int _mode; > > char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; > >}; > > >typedef struct _IO_FILE _IO_FILE; > > >struct _IO_FILE_plus; > >extern struct _IO_FILE_plus _IO_2_1_stdin_; >extern struct _IO_FILE_plus _IO_2_1_stdout_; >extern struct _IO_FILE_plus _IO_2_1_stderr_; ># 337 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 >typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); > > > > > > > >typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf, > size_t __n); > > > > > > > >typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w); > > >typedef int __io_close_fn (void *__cookie); ># 389 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 >extern int __underflow (_IO_FILE *); >extern int __uflow (_IO_FILE *); >extern int __overflow (_IO_FILE *, int); ># 433 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 >extern int _IO_getc (_IO_FILE *__fp); >extern int _IO_putc (int __c, _IO_FILE *__fp); >extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); >extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__)); > >extern int _IO_peekc_locked (_IO_FILE *__fp); > > > > > >extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); >extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); >extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); ># 462 "/usr/include/x86_64-linux-gnu/bits/libio.h" 3 4 >extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, > __gnuc_va_list, int *__restrict); >extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, > __gnuc_va_list); >extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t); >extern size_t _IO_sgetn (_IO_FILE *, void *, size_t); > >extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int); >extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int); > >extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__)); ># 42 "/usr/include/stdio.h" 2 3 4 > > > > >typedef __gnuc_va_list va_list; ># 57 "/usr/include/stdio.h" 3 4 >typedef __off_t off_t; ># 71 "/usr/include/stdio.h" 3 4 >typedef __ssize_t ssize_t; > > > > > > >typedef _G_fpos_t fpos_t; ># 131 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 ># 132 "/usr/include/stdio.h" 2 3 4 > > > >extern struct _IO_FILE *stdin; >extern struct _IO_FILE *stdout; >extern struct _IO_FILE *stderr; > > > > > > >extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)); > >extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int renameat (int __oldfd, const char *__old, int __newfd, > const char *__new) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > > >extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__)); ># 173 "/usr/include/stdio.h" 3 4 >extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 190 "/usr/include/stdio.h" 3 4 >extern char *tempnam (const char *__dir, const char *__pfx) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__)); > > > > > > > >extern int fclose (FILE *__stream); > > > > >extern int fflush (FILE *__stream); ># 213 "/usr/include/stdio.h" 3 4 >extern int fflush_unlocked (FILE *__stream); ># 232 "/usr/include/stdio.h" 3 4 >extern FILE *fopen (const char *__restrict __filename, > const char *__restrict __modes) __attribute__ ((__warn_unused_result__)); > > > > >extern FILE *freopen (const char *__restrict __filename, > const char *__restrict __modes, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); ># 265 "/usr/include/stdio.h" 3 4 >extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 278 "/usr/include/stdio.h" 3 4 >extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > >extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, > int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__)); > > > > >extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, > size_t __size) __attribute__ ((__nothrow__ , __leaf__)); > > >extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); > > > > > > > >extern int fprintf (FILE *__restrict __stream, > const char *__restrict __format, ...); > > > > >extern int printf (const char *__restrict __format, ...); > >extern int sprintf (char *__restrict __s, > const char *__restrict __format, ...) __attribute__ ((__nothrow__)); > > > > > >extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, > __gnuc_va_list __arg); > > > > >extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg); > >extern int vsprintf (char *__restrict __s, const char *__restrict __format, > __gnuc_va_list __arg) __attribute__ ((__nothrow__)); > > > >extern int snprintf (char *__restrict __s, size_t __maxlen, > const char *__restrict __format, ...) > __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4))); > >extern int vsnprintf (char *__restrict __s, size_t __maxlen, > const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0))); ># 365 "/usr/include/stdio.h" 3 4 >extern int vdprintf (int __fd, const char *__restrict __fmt, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 2, 0))); >extern int dprintf (int __fd, const char *__restrict __fmt, ...) > __attribute__ ((__format__ (__printf__, 2, 3))); > > > > > > > >extern int fscanf (FILE *__restrict __stream, > const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); > > > > >extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__)); > >extern int sscanf (const char *__restrict __s, > const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); ># 395 "/usr/include/stdio.h" 3 4 >extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") > > __attribute__ ((__warn_unused_result__)); >extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") > __attribute__ ((__warn_unused_result__)); >extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__)) > > ; ># 420 "/usr/include/stdio.h" 3 4 >extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, > __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); > > > > > >extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); > > >extern int vsscanf (const char *__restrict __s, > const char *__restrict __format, __gnuc_va_list __arg) > __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0))); ># 443 "/usr/include/stdio.h" 3 4 >extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf") > > > > __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__)); >extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf") > > __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__)); >extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__)) > > > > __attribute__ ((__format__ (__scanf__, 2, 0))); ># 477 "/usr/include/stdio.h" 3 4 >extern int fgetc (FILE *__stream); >extern int getc (FILE *__stream); > > > > > >extern int getchar (void); ># 495 "/usr/include/stdio.h" 3 4 >extern int getc_unlocked (FILE *__stream); >extern int getchar_unlocked (void); ># 506 "/usr/include/stdio.h" 3 4 >extern int fgetc_unlocked (FILE *__stream); ># 517 "/usr/include/stdio.h" 3 4 >extern int fputc (int __c, FILE *__stream); >extern int putc (int __c, FILE *__stream); > > > > > >extern int putchar (int __c); ># 537 "/usr/include/stdio.h" 3 4 >extern int fputc_unlocked (int __c, FILE *__stream); > > > > > > > >extern int putc_unlocked (int __c, FILE *__stream); >extern int putchar_unlocked (int __c); > > > > > > >extern int getw (FILE *__stream); > > >extern int putw (int __w, FILE *__stream); > > > > > > > >extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) > __attribute__ ((__warn_unused_result__)); ># 603 "/usr/include/stdio.h" 3 4 >extern __ssize_t __getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern __ssize_t getdelim (char **__restrict __lineptr, > size_t *__restrict __n, int __delimiter, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); > > > > > > > >extern __ssize_t getline (char **__restrict __lineptr, > size_t *__restrict __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); > > > > > > > >extern int fputs (const char *__restrict __s, FILE *__restrict __stream); > > > > > >extern int puts (const char *__s); > > > > > > >extern int ungetc (int __c, FILE *__stream); > > > > > > >extern size_t fread (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); > > > > >extern size_t fwrite (const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __s); ># 673 "/usr/include/stdio.h" 3 4 >extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, > size_t __n, FILE *__restrict __stream); > > > > > > > >extern int fseek (FILE *__stream, long int __off, int __whence); > > > > >extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__)); > > > > >extern void rewind (FILE *__stream); ># 707 "/usr/include/stdio.h" 3 4 >extern int fseeko (FILE *__stream, __off_t __off, int __whence); > > > > >extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__)); ># 731 "/usr/include/stdio.h" 3 4 >extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); > > > > >extern int fsetpos (FILE *__stream, const fpos_t *__pos); ># 757 "/usr/include/stdio.h" 3 4 >extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); > >extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > >extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > >extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); >extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); >extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > > > > >extern void perror (const char *__s); > > > > > ># 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4 ># 26 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4 >extern int sys_nerr; >extern const char *const sys_errlist[]; ># 782 "/usr/include/stdio.h" 2 3 4 > > > > >extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > > > >extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); ># 800 "/usr/include/stdio.h" 3 4 >extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__)); > > > > > >extern int pclose (FILE *__stream); > > > > > >extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__)); ># 840 "/usr/include/stdio.h" 3 4 >extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); > > > >extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)); > > >extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)); ># 859 "/usr/include/stdio.h" 3 4 ># 1 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 1 3 4 ># 43 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 3 4 >extern __inline __attribute__ ((__gnu_inline__)) int >getchar (void) >{ > return _IO_getc (stdin); >} > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >fgetc_unlocked (FILE *__fp) >{ > return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); >} > > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >getc_unlocked (FILE *__fp) >{ > return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >getchar_unlocked (void) >{ > return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++); >} > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >putchar (int __c) >{ > return _IO_putc (__c, stdout); >} > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >fputc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > > > > >extern __inline __attribute__ ((__gnu_inline__)) int >putc_unlocked (int __c, FILE *__stream) >{ > return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c))); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >putchar_unlocked (int __c) >{ > return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c))); >} ># 124 "/usr/include/x86_64-linux-gnu/bits/stdio.h" 3 4 >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream) >{ > return (((__stream)->_flags & 0x10) != 0); >} > > >extern __inline __attribute__ ((__gnu_inline__)) int >__attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream) >{ > return (((__stream)->_flags & 0x20) != 0); >} ># 860 "/usr/include/stdio.h" 2 3 4 > > ># 1 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 1 3 4 ># 23 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4 >extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen, > const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__)); >extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen, > const char *__restrict __format, > __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...) >{ > return __builtin___sprintf_chk (__s, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); >} > > > > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap) > >{ > return __builtin___vsprintf_chk (__s, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __ap); >} > > > >extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag, > size_t __slen, const char *__restrict __format, > ...) __attribute__ ((__nothrow__ , __leaf__)); >extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag, > size_t __slen, const char *__restrict __format, > __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__)); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...) > >{ > return __builtin___snprintf_chk (__s, __n, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ()); >} > > > > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int >__attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap) > >{ > return __builtin___vsnprintf_chk (__s, __n, 2 - 1, > __builtin_object_size (__s, 2 > 1), __fmt, __ap); >} > > > > > >extern int __fprintf_chk (FILE *__restrict __stream, int __flag, > const char *__restrict __format, ...); >extern int __printf_chk (int __flag, const char *__restrict __format, ...); >extern int __vfprintf_chk (FILE *__restrict __stream, int __flag, > const char *__restrict __format, __gnuc_va_list __ap); >extern int __vprintf_chk (int __flag, const char *__restrict __format, > __gnuc_va_list __ap); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int >fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) >{ > return __fprintf_chk (__stream, 2 - 1, __fmt, > __builtin_va_arg_pack ()); >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int >printf (const char *__restrict __fmt, ...) >{ > return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ()); >} > > > > > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int >vprintf (const char *__restrict __fmt, __gnuc_va_list __ap) >{ > > return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap); > > > >} > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int >vfprintf (FILE *__restrict __stream, > const char *__restrict __fmt, __gnuc_va_list __ap) >{ > return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap); >} > > >extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt, > ...) __attribute__ ((__format__ (__printf__, 3, 4))); >extern int __vdprintf_chk (int __fd, int __flag, > const char *__restrict __fmt, __gnuc_va_list __arg) > __attribute__ ((__format__ (__printf__, 3, 0))); > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int >dprintf (int __fd, const char *__restrict __fmt, ...) >{ > return __dprintf_chk (__fd, 2 - 1, __fmt, > __builtin_va_arg_pack ()); >} > > > > > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int >vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap) >{ > return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap); >} ># 240 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4 >extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") > > __attribute__ ((__warn_unused_result__)); >extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk") > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char * >fgets (char *__restrict __s, int __n, FILE *__restrict __stream) >{ > if (__builtin_object_size (__s, 2 > 1) != (size_t) -1) > { > if (!__builtin_constant_p (__n) || __n <= 0) > return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); > > if ((size_t) __n > __builtin_object_size (__s, 2 > 1)) > return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream); > } > return __fgets_alias (__s, __n, __stream); >} > >extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen, > size_t __size, size_t __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") > > > __attribute__ ((__warn_unused_result__)); >extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk") > > > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t >fread (void *__restrict __ptr, size_t __size, size_t __n, > FILE *__restrict __stream) >{ > if (__builtin_object_size (__ptr, 0) != (size_t) -1) > { > if (!__builtin_constant_p (__size) > || !__builtin_constant_p (__n) > || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) > return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); > > if (__size * __n > __builtin_object_size (__ptr, 0)) > return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream); > } > return __fread_alias (__ptr, __size, __n, __stream); >} ># 326 "/usr/include/x86_64-linux-gnu/bits/stdio2.h" 3 4 >extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen, > size_t __size, size_t __n, > FILE *__restrict __stream) __attribute__ ((__warn_unused_result__)); >extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") > > > __attribute__ ((__warn_unused_result__)); >extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk") > > > > > __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer"))) > ; > >extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t >fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, > FILE *__restrict __stream) >{ > if (__builtin_object_size (__ptr, 0) != (size_t) -1) > { > if (!__builtin_constant_p (__size) > || !__builtin_constant_p (__n) > || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) > return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, > __stream); > > if (__size * __n > __builtin_object_size (__ptr, 0)) > return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, > __stream); > } > > > if (__builtin_constant_p (__size) > && __builtin_constant_p (__n) > && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2)) > && __size * __n <= 8) > { > size_t __cnt = __size * __n; > char *__cptr = (char *) __ptr; > if (__cnt == 0) > return 0; > > for (; __cnt > 0; --__cnt) > { > int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++); > if (__c == (-1)) > break; > *__cptr++ = __c; > } > return (__cptr - (char *) __ptr) / __size; > } > > return __fread_unlocked_alias (__ptr, __size, __n, __stream); >} ># 863 "/usr/include/stdio.h" 2 3 4 > > > > > > ># 3 "test.c" 2 > > ># 4 "test.c" >void __attribute__ ((noinline)) set_one(unsigned char* ptr) >{ > *ptr = 1; >} > >int __attribute__ ((noinline)) check_zero(unsigned char const* in, unsigned int len) >{ > for (unsigned int i = 0; i < len; ++i) { > if (in[i] != 0) return 0; > } > return 1; >} > >void set_one_on_stack() { > unsigned char buf[1]; > set_one(buf); >} > >int main() { > for (int i = 0; i <= 4; ++i) { > unsigned char in[4]; > for (int j = 0; j < i; ++j) { > in[j] = 0; > set_one_on_stack(); > } > ># 29 "test.c" 3 4 > ((void) sizeof (( ># 29 "test.c" > check_zero(in, i) ># 29 "test.c" 3 4 > ) ? 1 : 0), __extension__ ({ if ( ># 29 "test.c" > check_zero(in, i) ># 29 "test.c" 3 4 > ) ; else __assert_fail ( ># 29 "test.c" > "check_zero(in, i)" ># 29 "test.c" 3 4 > , "test.c", 29, __extension__ __PRETTY_FUNCTION__); })) ># 29 "test.c" > ; > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 90348
: 46289 |
46290
|
46312