User account creation filtered due to spam.

Bug 40156 - [4.4 Regression] Possible bogus warning in libstdc++ headers
Summary: [4.4 Regression] Possible bogus warning in libstdc++ headers
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P2 normal
Target Milestone: 4.4.1
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks: Wuninitialized
  Show dependency treegraph
 
Reported: 2009-05-15 08:09 UTC by Martin Michlmayr
Modified: 2009-07-08 13:28 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Preprocessed code (172.14 KB, application/octet-stream)
2009-05-15 08:10 UTC, Martin Michlmayr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Michlmayr 2009-05-15 08:09:01 UTC
I'm getting the following warning when compiling wesnoth.  I'm not sure if
this is a bug in the code or in GCC but Andrew Pinski said I should file a
bug so someone can take a look at it.

This happens with gcc 4.4, but not with 4.3.

(sid)700:tbm@em64t: ~/src/wesnoth-1.6.2/src] g++-4.4 -c -O1 -Wall -Werror game_preferences.ii
cc1plus: warnings being treated as errors
game_preferences.cpp: In constructor 'preferences::manager::manager()':
game_preferences.cpp:66: error: 'v.std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::<anonymous>.std::_Vector_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_impl.std::_Vector_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_Vector_impl::_M_start' may be used uninitialized in this function
game_preferences.cpp:70: error: 'terrain.std::vector<t_translation::t_terrain, std::allocator<t_translation::t_terrain> >::<anonymous>.std::_Vector_base<t_translation::t_terrain, std::allocator<t_translation::t_terrain> >::_M_impl.std::_Vector_base<t_translation::t_terrain, std::allocator<t_translation::t_terrain> >::_Vector_impl::_M_start' may be used uninitialized in this function
zsh: exit 1     g++-4.4 -c -O1 -Wall -Werror game_preferences.ii
Comment 1 Martin Michlmayr 2009-05-15 08:10:12 UTC
Created attachment 17872 [details]
Preprocessed code
Comment 2 Paolo Carlini 2009-05-15 09:02:31 UTC
Definitely bogus, maybe we already have something open about this issue, CC-ing Richard, to be sure...
Comment 3 Manuel López-Ibáñez 2009-05-15 09:11:29 UTC
Does it happen on trunk?

The testcase is too big.
Comment 4 Richard Biener 2009-05-15 09:17:19 UTC
It is an uninitialized use in an exception handler.

;; basic block 132, loop depth 0, count 0
;; prev block 131, next block 133
;; pred:       131 (ab,eh,exec)
;; succ:       135 [100.0%]  (fallthru,exec)
<L49>:
save_filt.2381_159 = [filter_expr] <<<filter object>>>;
save_eptr.2380_160 = [exc_ptr_expr] <<<exception object>>>;
ivtmp.6668_667 = (long unsigned int) v$D45569$_M_impl$_M_start_645(D);
goto <bb 135>;

possibly reached from

;; basic block 116, loop depth 0, count 0
;; prev block 115, next block 117
;; pred:       115 [100.0%]  (fallthru,exec)
;; succ:       131 (ab,eh,exec) 117 [100.0%]  (fallthru,exec)
<bb 116>:
D.141736 = get (&D.141735); [return slot optimization]


we could avoid warning for these at all but I am not sure if that would
be appreciated.
Comment 5 Manuel López-Ibáñez 2009-06-18 16:28:19 UTC
(In reply to comment #4)
> It is an uninitialized use in an exception handler.

Is it an explicit exception handler? Or a compiler-generated?

In any case, it looks like the code is actually executed, so it may well be a bug in the code.
Comment 6 Manuel López-Ibáñez 2009-06-18 16:30:12 UTC
This is marked as a 4.4 regression. Does it happen in trunk?
Comment 7 Paolo Carlini 2009-06-18 17:19:31 UTC
Today I can't reproduce it neither with mainline nor with 4_4-branch.
Comment 8 Manuel López-Ibáñez 2009-07-08 13:28:16 UTC
I am going to close this as FIXED, since it cannot be reproduced anymore. If anyone manages to reproduce it in GCC 4.5, please reopen.