Bug 13863 - [tree-ssa] gcc.dg/uninit-D.c fails
[tree-ssa] gcc.dg/uninit-D.c fails
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: c
tree-ssa
: P2 minor
: tree-ssa
Assigned To: Andrew Pinski
: diagnostic, patch
Depends on:
Blocks: Wuninitialized 13127
  Show dependency treegraph
 
Reported: 2004-01-26 05:15 UTC by Andrew Pinski
Modified: 2005-11-02 19:17 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-02-06 05:26:47


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2004-01-26 05:15:23 UTC
The test gcc.dg/uninit-D.c fails on the tree-ssa because the tree-ssa warns about
initializing variable with self.
Comment 1 Andrew Pinski 2004-01-26 05:16:26 UTC
I will take care of it, basically my idea is to mark the variable somehow as 
initialized when converting between the language trees to gimple.
Comment 2 Andrew Pinski 2004-01-31 03:42:04 UTC
When I do this, I can remove the language hooks (which I had forgot to document).
Comment 3 Andrew Pinski 2004-02-06 05:26:46 UTC
Using TREE_NO_WARNING should fix it in the front-end trees to gimplifier phase.
Comment 4 Andrew Pinski 2004-02-06 06:43:51 UTC
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-02/msg00530.html>, I should say I think this 
will work, I have not tested it yet.
Comment 5 CVS Commits 2004-02-06 15:20:34 UTC
Subject: Bug 13863

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	tree-ssa-20020619-branch
Changes by:	pinskia@gcc.gnu.org	2004-02-06 15:20:31

Modified files:
	gcc            : ChangeLog.tree-ssa c-common.c c-common.h 
	                 c-lang.c c-simplify.c function.c 
	                 langhooks-def.h langhooks.c langhooks.h 
	gcc/cp         : ChangeLog.tree-ssa cp-lang.c 
	gcc/objc       : objc-lang.c 

Log message:
	2004-02-06  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR c/13863
	* c-common.c (c_decl_uninit_1): Remove.
	(c_decl_uninit): Remove.
	* c-common.h (c_decl_uninit): Remove prototype.
	* c-lang.c (LANG_HOOKS_DECL_UNINIT): Delete.
	* objc/objc-lang.c (LANG_HOOKS_DECL_UNINIT): Delete.
	* c-simplify.c (gimplify_decl_stmt): Set TREE_NO_WARNING
	on the decl where the initial is itself.
	* function.c (uninitialized_vars_warning): Remove old comment
	and check for DECL_INITIAL, replace with a check of TREE_NO_WARNING
	and do not call the langhook.
	* langhooks-def.h (LANG_HOOKS_DECL_UNINIT): Remove.
	(LANG_HOOKS_INITIALIZER): Remove usage of LANG_HOOKS_DECL_UNINIT.
	* langhooks.c (lhd_decl_uninit): Remove.
	* langhooks.h (lhd_decl_uninit): Remove prototype.
	
	2004-02-06  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR c/13863
	* cp-lang.c (LANG_HOOKS_DECL_UNINIT): Remove.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.1159&r2=1.1.2.1160
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.344.2.59&r2=1.344.2.60
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.h.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.141.2.45&r2=1.141.2.46
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-lang.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.94.2.17&r2=1.94.2.18
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-simplify.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.4.91&r2=1.1.4.92
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.374.2.38&r2=1.374.2.39
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks-def.h.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.34.2.27&r2=1.34.2.28
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.31.2.21&r2=1.31.2.22
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/langhooks.h.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.42.2.28&r2=1.42.2.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.68&r2=1.1.2.69
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-lang.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.36.2.28&r2=1.36.2.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/objc/objc-lang.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.24.2.13&r2=1.24.2.14

Comment 6 Andrew Pinski 2004-02-06 15:23:40 UTC
Fixed by the patch, on to PR 13127.