c/7227: Regression: bogus uninitialized variable warning with attribute mode TI

ghazi@caip.rutgers.edu ghazi@caip.rutgers.edu
Sat Jul 6 23:56:00 GMT 2002


>Number:         7227
>Category:       c
>Synopsis:       Regression: bogus uninitialized variable warning with attribute mode TI
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          mistaken
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 06 18:56:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Kaveh Ghazi
>Release:        gcc version 3.2 20020706 (experimental)
>Organization:
>Environment:
sparc-sun-solaris2.7 & mips-sgi-irix6.2 (but probably all)
>Description:
This testcase yields an uninitialized variable warning when compiled with the 3.2 trunk.  The current 3.1.x branch doesn't complain, thus it is a regression.  I've written the testcase in a form suitable for installation as gcc.dg/uninit-C.c:

/* Spurious uninitialized variable warning, inspired by libgcc2.c.  */
/* { dg-do compile } */
/* { dg-options "-O -Wuninitialized" } */

typedef int TItype __attribute__ ((mode (TI)));

TItype
__subvdi3 (TItype a, TItype b)
{
  TItype w;

  w = a - b;

  return w;
}
>How-To-Repeat:

>Fix:

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



More information about the Gcc-bugs mailing list