Bug 45121 - [4.6 Regression] c-c++-common/uninit-17.c
Summary: [4.6 Regression] c-c++-common/uninit-17.c
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-29 01:02 UTC by H.J. Lu
Modified: 2010-07-30 18:54 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-07-30 14:48:04


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2010-07-29 01:02:43 UTC
On Linux/x86-64, revision 162661 gave

FAIL: c-c++-common/uninit-17.c  (test for warnings, line 12)
FAIL: c-c++-common/uninit-17.c  (test for warnings, line 12)
FAIL: c-c++-common/uninit-17.c  -Wc++-compat   (test for warnings, line 12)
FAIL: c-c++-common/uninit-17.c  -Wc++-compat   (test for warnings, line 12)
FAIL: c-c++-common/uninit-17.c  -Wc++-compat  (test for excess errors)
FAIL: c-c++-common/uninit-17.c  -Wc++-compat  (test for excess errors)
FAIL: c-c++-common/uninit-17.c (test for excess errors)
FAIL: c-c++-common/uninit-17.c (test for excess errors)

Revision 162652 is OK.
Comment 1 H.J. Lu 2010-07-29 03:49:25 UTC
It is caused by revision 162653:

http://gcc.gnu.org/ml/gcc-cvs/2010-07/msg01007.html
Comment 2 davidxl 2010-07-29 05:51:42 UTC
The problem is that before the ivopt patch, the ivopt patch introduced a iv candidate that is unconditionally initialized with b:

  ivtmp_xxx = b (D);

After the patch, this assignment no longer exists, and the use of b in the test is via a PHI def -- thus the warning becomes 'may be uninitialized'.

Will fix the test case.

David
Comment 3 davidxl 2010-07-29 17:21:11 UTC
Fixed in r162687
Comment 4 H.J. Lu 2010-07-29 22:30:36 UTC
It isn't fixed. Revision 162688 gave

FAIL: c-c++-common/uninit-17.c  (test for warnings, line 14)
FAIL: c-c++-common/uninit-17.c  -Wc++-compat   (test for warnings, line 14)
Comment 5 H.J. Lu 2010-07-30 14:48:04 UTC
In fact, revision 162688 gave:

FAIL: c-c++-common/uninit-17.c  (test for warnings, line 12)
FAIL: c-c++-common/uninit-17.c  (test for warnings, line 14)
FAIL: c-c++-common/uninit-17.c (test for excess errors)
FAIL: c-c++-common/uninit-17.c  -Wc++-compat   (test for warnings, line 12)
FAIL: c-c++-common/uninit-17.c  -Wc++-compat   (test for warnings, line 14)
FAIL: c-c++-common/uninit-17.c  -Wc++-compat  (test for excess errors)
Comment 6 H.J. Lu 2010-07-30 18:54:47 UTC
Fixed by revision 162720.