[Bug middle-end/48558] -Warray-bounds fails to detect the out of bound array access

2011-04-12 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48558 Richard Guenther changed: What|Removed |Added Keywords||diagnostic Status|UNCONFIR

[Bug middle-end/48558] -Warray-bounds fails to detect the out of bound array access

2011-04-11 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48558 --- Comment #2 from H.J. Lu 2011-04-11 19:09:54 UTC --- A simple change from return &elf_howto_table[R_386_IRELATIVE]; to return elf_howto_table[R_386_IRELATIVE]; makes GCC to warn: [hjl@gnu-6 bfd]$ cat x.c enum bfd_reloc_code_real { BFD_R

[Bug middle-end/48558] -Warray-bounds fails to detect the out of bound array access

2011-04-11 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48558 --- Comment #1 from H.J. Lu 2011-04-11 18:40:07 UTC --- A testcase: [hjl@gnu-6 bfd]$ cat x.c enum bfd_reloc_code_real { BFD_RELOC_386_IRELATIVE }; typedef enum bfd_reloc_code_real bfd_reloc_code_real_type; typedef const struct reloc_howto_str