public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: other/4956: Strange error while trying to compile large defined 3d arrays
@ 2002-12-03 11:38 bangerth
  0 siblings, 0 replies; 3+ messages in thread
From: bangerth @ 2002-12-03 11:38 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jeff, nobody

Synopsis: Strange error while trying to compile large defined 3d arrays

State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Tue Dec  3 11:38:02 2002
State-Changed-Why:
    Newer compilers yield
    tmp/g> /home/bangerth/bin/gcc-3.2.2-pre/bin/gcc -c x.c
    x.c: In function `main':
    x.c:2: size of variable `blah' is too large

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4956


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

* Re: other/4956: Strange error while trying to compile large defined 3d arrays
@ 2001-11-21  5:06 Andrew Pinski
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Pinski @ 2001-11-21  5:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR other/4956; it has been noted by GNATS.

From: Andrew Pinski <pinskia@physics.uc.edu>
To: jeff@jeff.ath.cx
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: other/4956: Strange error while trying to compile large defined 3d arrays
Date: Tue, 27 Nov 2001 10:47:27 -0500

 here is the backtrace from gcc3.1(prerelease):
 
 Breakpoint 4, assign_stack_temp_for_type (mode=BLKmode, size=-1, keep=1, 
 type=0x40187bc8)
      at /lhome/src/gnu/gcc/gcc3.1/src/gcc/function.c:643
 643         abort ();
 (gdb) bt
 #0  assign_stack_temp_for_type (mode=BLKmode, size=-1, keep=1, 
 type=0x40187bc8)
      at /lhome/src/gnu/gcc/gcc3.1/src/gcc/function.c:643
 #1  0x08126db9 in assign_temp (type=0x40187bc8, keep=1, 
 memory_required=1, dont_promote=1)
      at /lhome/src/gnu/gcc/gcc3.1/src/gcc/function.c:859
 #2  0x08211b22 in expand_decl (decl=0x40187c3c) at 
 /lhome/src/gnu/gcc/gcc3.1/src/gcc/stmt.c:4049
 #3  0x08088058 in emit_local_var (decl=0x40187c3c)
      at /lhome/src/gnu/gcc/gcc3.1/src/gcc/c-semantics.c:261
 #4  0x08089927 in expand_stmt (t=0x40177330)
      at /lhome/src/gnu/gcc/gcc3.1/src/gcc/c-semantics.c:755
 #5  0x080895bb in genrtl_compound_stmt (t=0x40177318)
      at /lhome/src/gnu/gcc/gcc3.1/src/gcc/c-semantics.c:668
 #6  0x0808991a in expand_stmt (t=0x40177318)
      at /lhome/src/gnu/gcc/gcc3.1/src/gcc/c-semantics.c:775
 #7  0x080648a5 in c_expand_body (fndecl=0x40187740, nested_p=0, 
 can_defer_p=1)
      at /lhome/src/gnu/gcc/gcc3.1/src/gcc/c-decl.c:6862
 #8  0x0806452d in finish_function (nested=0) at 
 /lhome/src/gnu/gcc/gcc3.1/src/gcc/c-decl.c:6757
 #9  0x0804a0f2 in yyparse_1 () at /usr/lib/bison.simple:354
 #10 0x0821d304 in compile_file () at 
 /lhome/src/gnu/gcc/gcc3.1/src/gcc/toplev.c:2128
 #11 0x08222706 in toplev_main (argc=33, argv=0xbfffee54)
      at /lhome/src/gnu/gcc/gcc3.1/src/gcc/toplev.c:5173
 #12 0x0809754b in main (argc=33, argv=0xbfffee54) at 
 /lhome/src/gnu/gcc/gcc3.1/src/gcc/main.c:35
 #13 0x40041f31 in __libc_start_main (main=0x8097530 <main>, argc=33, 
 ubp_av=0xbfffee54,
      init=0x8049038 <_init>, fini=0x82dba54 <_fini>, rtld_fini=0x4000e274 
 <_dl_fini>,
      stack_end=0xbfffee4c) at ../sysdeps/generic/libc-start.c:129
 
 (gdb) p *type
 $2 = {common = {chain = 0x0, type = 0x40187a6c, aux = 0x0, code = 
 ARRAY_TYPE,
      side_effects_flag = 0, constant_flag = 0, addressable_flag = 0, 
 volatile_flag = 0,
      readonly_flag = 0, unsigned_flag = 0, asm_written_flag = 0, 
 used_flag = 0, nothrow_flag = 0,
      static_flag = 0, public_flag = 0, private_flag = 0, protected_flag = 
 0, bounded_flag = 0,
      lang_flag_0 = 0, lang_flag_1 = 0, lang_flag_2 = 0, lang_flag_3 = 0, 
 lang_flag_4 = 0,
      lang_flag_5 = 0, lang_flag_6 = 0, dummy = 0}, int_cst = {common = 
 {chain = 0x0,
        type = 0x40187a6c, aux = 0x0, code = ARRAY_TYPE, 
 side_effects_flag = 0, constant_flag = 0,
        addressable_flag = 0, volatile_flag = 0, readonly_flag = 0, 
 unsigned_flag = 0,
        asm_written_flag = 0, used_flag = 0, nothrow_flag = 0, 
 static_flag = 0, public_flag = 0,
        private_flag = 0, protected_flag = 0, bounded_flag = 0, 
 lang_flag_0 = 0, lang_flag_1 = 0,
        lang_flag_2 = 0, lang_flag_3 = 0, lang_flag_4 = 0, lang_flag_5 = 
 0, lang_flag_6 = 0,
        dummy = 0}, rtl = 0x4018789c, int_cst = {low = 1075263424, high = 
 1075263488}}, real_cst = {
      common = {chain = 0x0, type = 0x40187a6c, aux = 0x0, code = 
 ARRAY_TYPE,
        side_effects_flag = 0, constant_flag = 0, addressable_flag = 0, 
 volatile_flag = 0,
        readonly_flag = 0, unsigned_flag = 0, asm_written_flag = 0, 
 used_flag = 0,
        nothrow_flag = 0, static_flag = 0, public_flag = 0, private_flag = 
 0, protected_flag = 0,
        bounded_flag = 0, lang_flag_0 = 0, lang_flag_1 = 0, lang_flag_2 = 
 0, lang_flag_3 = 0,
        lang_flag_4 = 0, lang_flag_5 = 0, lang_flag_6 = 0, dummy = 0}, 
 rtl = 0x4018789c,
      real_cst = {r = {1075263424, 1075263488, 0, 262, 25600}}}, string = 
 {common = {chain = 0x0,
        type = 0x40187a6c, aux = 0x0, code = ARRAY_TYPE, 
 side_effects_flag = 0, constant_flag = 0,
        addressable_flag = 0, volatile_flag = 0, readonly_flag = 0, 
 unsigned_flag = 0,
        asm_written_flag = 0, used_flag = 0, nothrow_flag = 0, 
 static_flag = 0, public_flag = 0,
        private_flag = 0, protected_flag = 0, bounded_flag = 0, 
 lang_flag_0 = 0, lang_flag_1 = 0,
        lang_flag_2 = 0, lang_flag_3 = 0, lang_flag_4 = 0, lang_flag_5 = 
 0, lang_flag_6 = 0,
 ---Type <return> to continue, or q <return> to quit---
        dummy = 0}, rtl = 0x4018789c, Segmentation fault (core dumped)
 
 On Tuesday, November 27, 2001, at 10:19 , jeff@jeff.ath.cx wrote:
 
 >
 >> Number:         4956
 >> Category:       other
 >> Synopsis:       Strange error while trying to compile large defined 3d 
 >> arrays
 >> Confidential:   no
 >> Severity:       non-critical
 >> Priority:       medium
 >> Responsible:    unassigned
 >> State:          open
 >> Class:          accepts-illegal
 >> Submitter-Id:   net
 >> Arrival-Date:   Tue Nov 27 07:26:01 PST 2001
 >> Closed-Date:
 >> Last-Modified:
 >> Originator:     Jeff Evans
 >> Release:        2.95.3
 >> Organization:
 >> Environment:
 > FreeBSD 4.3-Release
 >> Description:
 > When trying to compile a large 3d array, you get the error message:
 > array too large
 > But when you compile the code below, you get this error message:
 >
 > [jeff@jeff:~] gcc -o t t.c
 > t.c: In function `main':
 > t.c:4: Internal compiler error in `assign_stack_temp_for_type', at 
 > function.c:940
 > Please submit a full bug report.
 > See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
 >
 >
 >
 > int main(){
 >         int blah[1000][1000][1000];
 >         scanf("%d",blah);
 > return 0;
 > }
 >
 >
 >> How-To-Repeat:
 > I haven't tested it on any other architecture/OS, but you should be 
 > able to repeat it on FreeBSD 4.3-Release by attempting to compile code 
 > with the correct 3d array size.
 >> Fix:
 >
 >> Release-Note:
 >> Audit-Trail:
 >> Unformatted:
 >
 


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

* other/4956: Strange error while trying to compile large defined 3d arrays
@ 2001-11-21  5:06 jeff
  0 siblings, 0 replies; 3+ messages in thread
From: jeff @ 2001-11-21  5:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         4956
>Category:       other
>Synopsis:       Strange error while trying to compile large defined 3d arrays
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 27 07:26:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jeff Evans
>Release:        2.95.3
>Organization:
>Environment:
FreeBSD 4.3-Release
>Description:
When trying to compile a large 3d array, you get the error message:
array too large
But when you compile the code below, you get this error message:

[jeff@jeff:~] gcc -o t t.c
t.c: In function `main':
t.c:4: Internal compiler error in `assign_stack_temp_for_type', at function.c:940
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.



int main(){
        int blah[1000][1000][1000];
        scanf("%d",blah);
return 0;
}


>How-To-Repeat:
I haven't tested it on any other architecture/OS, but you should be able to repeat it on FreeBSD 4.3-Release by attempting to compile code with the correct 3d array size.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-12-03 19:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-03 11:38 other/4956: Strange error while trying to compile large defined 3d arrays bangerth
  -- strict thread matches above, loose matches on Subject: below --
2001-11-21  5:06 jeff
2001-11-21  5:06 Andrew Pinski

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