This is the mail archive of the gcc-prs@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]

c/6643: gcc fails in tree check for assignment to variable sized array



>Number:         6643
>Category:       c
>Synopsis:       gcc fails in tree check for assignment to variable sized array
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 13 04:06:05 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Philipp Thomas, SuSE Linux Ag
>Release:        3.1 20020506
>Organization:
>Environment:
axp-suse-linux
>Description:
Given this test case:

void foo (unsigned int len)
{
    char str[len];
    str[0] = '\0';
}

gcc with checking enabled fails with:

t.c: In function `foo':
t.c:5: tree check: expected integer_cst, have plus_expr in tree_int_cst_sgn, at tree.c:3513

>How-To-Repeat:

>Fix:

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


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