[Bug c++/84299] New: warning: '' may be used uninitialized in this function

2018-02-08 Thread bugzilla at cpockrandt dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84299

Bug ID: 84299
   Summary: warning: '' may be used uninitialized in
this function
   Product: gcc
   Version: 8.0.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bugzilla at cpockrandt dot de
  Target Milestone: ---

The warnings appeared between versions 8.0.1.s20180121 and 8.0.1.s20180128.

The attached *.ii file was produced by g++8 (FreeBSD Ports Collection) 8.0.1
20180128 (experimental)

/usr/local/bin/g++8  -DSEQAN_DISABLE_VERSION_CHECK -DSEQAN_ENABLE_TESTING=1
-DSEQAN_HAS_BZIP2=1 -DSEQAN_HAS_EXECINFO=1 -DSEQAN_HAS_OPENMP=1
-DSEQAN_HAS_ZLIB=1 -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_USE_C99=1
-D_LARGEFILE_SOURCE -I/home/mi/cpockrandt/seqan/include -save-temps  -W -Wall
-pedantic -fopenmp -O3 -DSEQAN_GLOBAL_EXCEPTION_HANDLER=1 -o
CMakeFiles/test_index_vstree.dir/test_index_vstree.cpp.o -c
/home/mi/cpockrandt/seqan/tests/index/test_index_vstree.cpp
In file included from
/home/mi/cpockrandt/seqan/include/seqan/basic/basic_iterator.h:80,
 from /home/mi/cpockrandt/seqan/include/seqan/basic.h:86,
 from /home/mi/cpockrandt/seqan/include/seqan/sequence.h:74,
 from
/home/mi/cpockrandt/seqan/tests/index/test_index_vstree.cpp:1:
/home/mi/cpockrandt/seqan/include/seqan/basic/iterator_adaptor.h: In function
'int main()':
/home/mi/cpockrandt/seqan/include/seqan/basic/iterator_adaptor.h:102:9:
warning: '' may be used uninitialized in this function
[-Wmaybe-uninitialized]
 data_iterator = TIterator();
 ^

Interestingly this error occurs only with -O3, not without optimization.

I tried to reduce the code as much as possible but wasn't very successful with
delta & co. It is still quite big, so I uploaded it elsewhere.

http://www.inf.fu-berlin.de/users/cpockrandt/test_index_vstree.ii (6.4 MB).

It might also be a duplicate:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84078

[Bug c++/83739] [8 Regression] error: range-based 'for' expression of type 'auto' has incomplete type

2018-01-08 Thread bugzilla at cpockrandt dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83739

--- Comment #5 from Chris  ---
(In reply to Chris from comment #4)
> This is the intermediate file of the most simplified code that I came up
> with that reproduces the error (1.9 MB)
> 
> http://www.inf.fu-berlin.de/users/cpockrandt/test_find2_index_approx2.ii

(In reply to Andrew Pinski from comment #3)
> (In reply to Jonathan Wakely from comment #2)
> > There's no way all that code is relevant to the problem.
> > 
> > https://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
> 
> Note one method which is not mentioned here when there is a regression in
> rejecting valid code is to test the older working compiler too.
> 
> So a testing "bash" script (which returns 0 when the test should be accepted
> but is not currently, and non zero otherwise) would look something like:
> 
> if old-gcc $1; then
>   exit 1
> fi
> 
> if gcc $1; then
>   exit 0
> fi
> 
> exit 1
>  CUT ---
> And then you use that with delta or otherwise.

Thanks! I'll apply this for reducing the code at the end of the week when I got
more time!

[Bug c++/83739] [8 Regression] error: range-based 'for' expression of type 'auto' has incomplete type

2018-01-08 Thread bugzilla at cpockrandt dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83739

--- Comment #4 from Chris  ---
This is the intermediate file of the most simplified code that I came up with
that reproduces the error (1.9 MB)

http://www.inf.fu-berlin.de/users/cpockrandt/test_find2_index_approx2.ii

[Bug c++/83739] error: range-based 'for' expression of type 'auto' has incomplete type

2018-01-08 Thread bugzilla at cpockrandt dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83739

--- Comment #1 from Chris  ---
Sorry, the ii-file is too large to post it here, I uploaded it instead
somewhere else (7.7 MB):

www.inf.fu-berlin.de/users/cpockrandt/test_find2_index_approx.ii

[Bug c++/83739] New: error: range-based 'for' expression of type 'auto' has incomplete type

2018-01-08 Thread bugzilla at cpockrandt dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83739

Bug ID: 83739
   Summary: error: range-based 'for' expression of type 'auto' has
incomplete type
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bugzilla at cpockrandt dot de
  Target Milestone: ---

Compiler/OS information:

g++8 (FreeBSD Ports Collection) 8.0.0 20171224 (experimental)

Error-Message (see below for complete output):

/home/mi/user/seqan/tests/index/test_find2_index_approx.h:478:9: error:
range-based 'for' expression of type 'auto' has incomplete type
 for (auto occ : getOccurrences(iter))
 ^~~

Command:

/usr/local/bin/g++8  -DSEQAN_DISABLE_VERSION_CHECK -DSEQAN_ENABLE_TESTING=1
-DSEQAN_HAS_BZIP2=1 -DSEQAN_HAS_EXECINFO=1 -DSEQAN_HAS_OPENMP=1
-DSEQAN_HAS_ZLIB=1 -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_USE_C99=1
-D_LARGEFILE_SOURCE -I/home/mi/user/seqan/include -save-temps  -W -Wall
-pedantic  -fno-omit-frame-pointer -fopenmp -g -DSEQAN_ENABLE_DEBUG=1   
-DSEQAN_GLOBAL_EXCEPTION_HANDLER=1 -o
CMakeFiles/test_find2_index_approx.dir/test_find2_index_approx.cpp.o -c
/home/mi/user/seqan/tests/index/test_find2_index_approx.cpp

It works with the latest versions of g++4, 5, 6 and 7 and clang.

---

Complete output:

[user@celegans ~/seqan-build]$ make VERBOSE=1 test_find2_index_approx
/usr/local/bin/cmake -H/home/mi/user/seqan -B/home/mi/user/seqan-build
--check-build-system CMakeFiles/Makefile.cmake 0
make -f CMakeFiles/Makefile2 test_find2_index_approx
/usr/local/bin/cmake -H/home/mi/user/seqan -B/home/mi/user/seqan-build
--check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start
/home/mi/user/seqan-build/CMakeFiles 0
make -f CMakeFiles/Makefile2
tests/index/CMakeFiles/test_find2_index_approx.dir/all
make -f CMakeFiles/seqan_library.dir/build.make
CMakeFiles/seqan_library.dir/depend
cd /home/mi/user/seqan-build && /usr/local/bin/cmake -E cmake_depends "Unix
Makefiles" /home/mi/user/seqan /home/mi/user/seqan /home/mi/user/seqan-build
/home/mi/user/seqan-build
/home/mi/user/seqan-build/CMakeFiles/seqan_library.dir/DependInfo.cmake
--color=
Dependee
"/home/mi/user/seqan-build/CMakeFiles/seqan_library.dir/DependInfo.cmake" is
newer than depender
"/home/mi/user/seqan-build/CMakeFiles/seqan_library.dir/depend.internal".
Dependee "/home/mi/user/seqan-build/CMakeFiles/CMakeDirectoryInformation.cmake"
is newer than depender
"/home/mi/user/seqan-build/CMakeFiles/seqan_library.dir/depend.internal".
Scanning dependencies of target seqan_library
make -f CMakeFiles/seqan_library.dir/build.make
CMakeFiles/seqan_library.dir/build
Built target seqan_library
make -f tests/index/CMakeFiles/test_find2_index_approx.dir/build.make
tests/index/CMakeFiles/test_find2_index_approx.dir/depend
cd /home/mi/user/seqan-build && /usr/local/bin/cmake -E cmake_depends "Unix
Makefiles" /home/mi/user/seqan /home/mi/user/seqan/tests/index
/home/mi/user/seqan-build /home/mi/user/seqan-build/tests/index
/home/mi/user/seqan-build/tests/index/CMakeFiles/test_find2_index_approx.dir/DependInfo.cmake
--color=
Dependee
"/home/mi/user/seqan-build/tests/index/CMakeFiles/test_find2_index_approx.dir/DependInfo.cmake"
is newer than depender
"/home/mi/user/seqan-build/tests/index/CMakeFiles/test_find2_index_approx.dir/depend.internal".
Dependee
"/home/mi/user/seqan-build/tests/index/CMakeFiles/CMakeDirectoryInformation.cmake"
is newer than depender
"/home/mi/user/seqan-build/tests/index/CMakeFiles/test_find2_index_approx.dir/depend.internal".
Scanning dependencies of target test_find2_index_approx
make -f tests/index/CMakeFiles/test_find2_index_approx.dir/build.make
tests/index/CMakeFiles/test_find2_index_approx.dir/build
Building CXX object
tests/index/CMakeFiles/test_find2_index_approx.dir/test_find2_index_approx.cpp.o
cd /home/mi/user/seqan-build/tests/index && /usr/local/bin/g++8 
-DSEQAN_DISABLE_VERSION_CHECK -DSEQAN_ENABLE_TESTING=1 -DSEQAN_HAS_BZIP2=1
-DSEQAN_HAS_EXECINFO=1 -DSEQAN_HAS_OPENMP=1 -DSEQAN_HAS_ZLIB=1
-D_FILE_OFFSET_BITS=64 -D_GLIBCXX_USE_C99=1 -D_LARGEFILE_SOURCE
-I/home/mi/user/seqan/include -save-temps  -W -Wall -pedantic 
-fno-omit-frame-pointer -fopenmp -g -DSEQAN_ENABLE_DEBUG=1   
-DSEQAN_GLOBAL_EXCEPTION_HANDLER=1 -o
CMakeFiles/test_find2_index_approx.dir/test_find2_index_approx.cpp.o -c
/home/mi/user/seqan/tests/index/test_find2_index_approx.cpp
In file included from
/home/mi/user/seqan/tests/index/test_find2_index_approx.cpp:37:
/home/mi/user/seqan/tests/index/test_find2_index_approx.h: In instantiation of
'void SEQAN_TEST_test_find2_index_approx_small_test() [with bool
speed_up_dummy_to_prevent_compilation_of_unused_tests_ = true