https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111073

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Rogério de Souza Moraes from comment #6)
> We got similar issue with a very small code using GCC v14.2:
> 
> https://godbolt.org/z/b5dqvnKqj
> 
> **********************
> 
> #include <vector>
> 
> void foo(int mod_id, std::vector<std::vector<int>> &_modMpcCluster) {
>      std::vector<int> cluster;
>      cluster.push_back(mod_id);
>      _modMpcCluster.push_back(cluster);
> }

This one was fixed on trunk by r15-4473-g3abe751ea86e34:

libstdc++: Refactor std::uninitialized_{copy,fill,fill_n} algos [PR68350]


I can't reproduce the false positive warning with Sam's original (only lots of
-Wswitch -Wsign-compare -Wignored-qualifiers warnings). I am using
-D_GLIBCXX_ASSERTIONS.

Simon's creduce.cpp is just full of bugs from over-reducing it (the
-Wreturn-type and -Wuninitialized suggest it's not even worth trying to analyze
that code). The unreduced .ii would be more useful.

Reply via email to