Commit 426797b2 by Bernd Schmidt Committed by Bernd Schmidt

re PR middle-end/44738 (c-c++-common/uninit-17.c failed)

	PR middle-end/44738
	* tree-ssa.c (warn_uninit): Avoid emitting an unnecessary message.

	PR middle-end/44738
	* c-c++-common/uninit-17.c: Correct expected error.

From-SVN: r162372
parent 35e3a6e9
2010-07-21 Bernd Schmidt <bernds@codesourcery.com>
PR middle-end/44738
* tree-ssa.c (warn_uninit): Avoid emitting an unnecessary message.
2010-07-21 Richard Guenther <rguenther@suse.de>
PR middle-end/45013
......
2010-07-21 Bernd Schmidt <bernds@codesourcery.com>
PR middle-end/44738
* c-c++-common/uninit-17.c: Correct expected error.
2010-07-21 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/guality/asm-1.c: New test.
......
......@@ -9,9 +9,9 @@ static void bar(int a, int *ptr)
{
do
{
int b; /* { dg-message "note: 'b' was declared here" } */
int b; /* { dg-warning "is used uninitialized" } */
if (b < 40) {
ptr[0] = b; /* { dg-warning "may be used uninitialized" } */
ptr[0] = b;
}
b += 1;
ptr++;
......
......@@ -1632,6 +1632,8 @@ warn_uninit (tree t, const char *gmsgid, void *data)
{
TREE_NO_WARNING (var) = 1;
if (location == DECL_SOURCE_LOCATION (var))
return;
if (xloc.file != floc.file
|| xloc.line < floc.line
|| xloc.line > LOCATION_LINE (cfun->function_end_locus))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment