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]

[Bug c/57821] 'array is too large' error is missing when sizetype overflows


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

--- Comment #4 from Chung-Ju Wu <jasonwucj at gmail dot com> ---
(In reply to John David Anglin from comment #3)
> On 32-bit hppa-unknown-linux-gnu:
> 
> Executing on host: /home/dave/gnu/gcc/objdir/gcc/xgcc
> -B/home/dave/gnu/gcc/objdi
> r/gcc/ /home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/large-size-array-6.c 
> -fno-di
> agnostics-show-caret -fdiagnostics-color=never   -O2 -S  -o
> large-size-array-6.s    (timeout = 300)
> spawn /home/dave/gnu/gcc/objdir/gcc/xgcc -B/home/dave/gnu/gcc/objdir/gcc/
> /home/
> dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/large-size-array-6.c
> -fno-diagnostics-show
> -caret -fdiagnostics-color=never -O2 -S -o large-size-array-6.s
> /home/dave/gnu/gcc/gcc/gcc/testsuite/gcc.dg/large-size-array-6.c:6:3:
> internal c
> ompiler error: in tree_low_cst, at tree.c:6805
> 0x7b8eab tree_low_cst(tree_node const*, int)
>         ../../gcc/gcc/tree.c:6805
> 0x134c73 process_init_element(c_expr, bool, obstack*)
>         ../../gcc/gcc/c/c-typeck.c:8351
> 0x1537b7 c_parser_initval
>         ../../gcc/gcc/c/c-parser.c:4023
> 0x15306f c_parser_initelt
>         ../../gcc/gcc/c/c-parser.c:3997
> 0x15306f c_parser_braced_init
>         ../../gcc/gcc/c/c-parser.c:3779
> 0x158343 c_parser_initializer
>         ../../gcc/gcc/c/c-parser.c:3737
> 0x158343 c_parser_declaration_or_fndef
>         ../../gcc/gcc/c/c-parser.c:1651
> 0x15d883 c_parser_external_declaration
>         ../../gcc/gcc/c/c-parser.c:1363
> 0x15e58b c_parser_translation_unit
>         ../../gcc/gcc/c/c-parser.c:1251
> 0x15e58b c_parse_file()
>         ../../gcc/gcc/c/c-parser.c:11000
> 0x1ae0ff c_common_parse_file()
>         ../../gcc/gcc/c-family/c-opts.c:1046

Same issue on my 32-bit nds32le-elf target:

Executing on host:
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/build/build-nds32le-elf-newlib-v3/build-gcc-final/gcc/xgcc
-B/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/build/build
-nds32le-elf-newlib-v3/build-gcc-final/gcc/
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/testsuite/gcc.dg/large-size-array-6.c
 -fno-diagnostics-show-caret -fdiagno
stics-color=never   -O2 -S   -DSIGNAL_SUPPRESS  -o large-size-array-6.s   
(timeout = 600)
spawn
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/build/build-nds32le-elf-newlib-v3/build-gcc-final/gcc/xgcc
-B/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/build/build-nds32le-elf-
newlib-v3/build-gcc-final/gcc/
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/testsuite/gcc.dg/large-size-array-6.c
-fno-diagnostics-show-caret -fdiagnostics-color=ne
ver -O2 -S -DSIGNAL_SUPPRESS -o large-size-array-6.s
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/testsuite/gcc.dg/large-size-array-6.c:6:3:
internal compiler error: in tree_low_cst, at tree.c:6805
0x87b4492 tree_low_cst(tree_node const*, int)
       
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/tree.c:6805
0x8098f4c process_init_element(c_expr, bool, obstack*)
       
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/c/c-typeck.c:8351
0x80ab8ef c_parser_initval
       
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/c/c-parser.c:4023
0x80ab78e c_parser_initelt^M
       
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/c/c-parser.c:3997
0x80aaf25 c_parser_braced_init^M
       
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/c/c-parser.c:3779
0x80aad75 c_parser_initializer^M
       
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/c/c-parser.c:3737
0x80a70f4 c_parser_declaration_or_fndef
       
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/c/c-parser.c:1651
0x80a69f5 c_parser_external_declaration
       
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/c/c-parser.c:1363
0x80a665b c_parser_translation_unit
       
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/c/c-parser.c:1251
0x80bc250 c_parse_file()
       
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/c/c-parser.c:11223
0x811af58 c_common_parse_file()
       
/home1/jasonwucj/WORKING/WORK-CONTRIBUTION/build-system-3/source-packages/gcc-4.9.0/gcc/c-family/c-opts.c:1046
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


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