[Bug c++/96781] New: internal compiler error: Segmentation fault

2020-08-25 Thread pengtingbit at 126 dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96781

Bug ID: 96781
   Summary: internal compiler error: Segmentation fault
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pengtingbit at 126 dot com
  Target Milestone: ---

╰─➤  uname -a  
127 ↵
Linux research 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020
x86_64 x86_64 x86_64 GNU/Linux

At https://github.com/pengtingbit/concurrencpp/tree/refactor-folders, in branch
refactor-folders and commit 64177ee.

When using Ubuntu20.04 focal and installed GNU 10.0.1:
╰─➤  cmake ..
-- The C compiler identification is GNU 10.0.1
-- The CXX compiler identification is GNU 10.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc-10 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++-10 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ### concurrencpp ###
-- ###  ###
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.17") found components:
doxygen dot 
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pengting/git/concurrencpp/build

╭─pengting@research ~/git/concurrencpp/build  ‹refactor-folders*› 
╰─➤  make
Scanning dependencies of target concurrencpp
[  7%] Building CXX object
src/CMakeFiles/concurrencpp.dir/executors/executor.cpp.o
[ 15%] Building CXX object
src/CMakeFiles/concurrencpp.dir/runtime/runtime.cpp.o
[ 23%] Building CXX object src/CMakeFiles/concurrencpp.dir/threads/thread.cpp.o
[ 30%] Building CXX object
src/CMakeFiles/concurrencpp.dir/results/result_core.cpp.o
[ 38%] Building CXX object
src/CMakeFiles/concurrencpp.dir/executors/manual_executor.cpp.o
[ 46%] Building CXX object
src/CMakeFiles/concurrencpp.dir/executors/thread_executor.cpp.o
[ 53%] Building CXX object
src/CMakeFiles/concurrencpp.dir/executors/thread_pool_executor.cpp.o
[ 61%] Building CXX object
src/CMakeFiles/concurrencpp.dir/executors/worker_thread_executor.cpp.o
[ 69%] Building CXX object
src/CMakeFiles/concurrencpp.dir/timers/Timer_queue.cpp.o
[ 76%] Building CXX object src/CMakeFiles/concurrencpp.dir/timers/timer.cpp.o
In file included from /home/pengting/git/concurrencpp/src/timers/timer.cpp:3:
/home/pengting/git/concurrencpp/src/timers/../../include/executors/executor.h:
In instantiation of ‘static concurrencpp::null_result
concurrencpp::Executor::post_bridge(concurrencpp::executor_tag,
concurrencpp::Executor*, decayed_type) [with callable_type =
concurrencpp::details::timer_state_base::fire()::; decayed_type =
concurrencpp::details::timer_state_base::fire()::]’:
/home/pengting/git/concurrencpp/src/timers/../../include/executors/executor.h:68:30:
  required from ‘void concurrencpp::Executor::post(callable_type&&) [with
callable_type = concurrencpp::details::timer_state_base::fire()::]’
/home/pengting/git/concurrencpp/src/timers/timer.cpp:37:3:   required from here
/home/pengting/git/concurrencpp/src/timers/../../include/executors/executor.h:23:3:
internal compiler error: Segmentation fault
   23 |   }
  |   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[2]: *** [src/CMakeFiles/concurrencpp.dir/build.make:199:
src/CMakeFiles/concurrencpp.dir/timers/timer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:190: src/CMakeFiles/concurrencpp.dir/all]
Error 2
make: *** [Makefile:103: all] Error 2

#
#


At https://github.com/pengtingbit/concurrencpp/tree/refactor-folders, in branch
refactor-folders and commit b7c04e5.

When using Ubuntu20.04 focal and gcc-snapshot:
╰─➤  LD_LIBRARY_PATH=/usr/lib/gcc-snapshot/lib:$LD_LIBRARY_PATH
╰─➤  PATH=/usr/lib/gcc-snapshot/bin:$PATH
╰─➤  which gcc  
/usr/lib/gcc-snapshot/bin/gcc
╰─➤  gcc --version
gcc (Ubuntu 20200418-1ubuntu1) 10.0.1 20200418 (experimental) [master revision
b57e1621eb7:e6f26876f0c:baf3b9b2e5259558ef86bd62398e2ccecd7a4a4c]
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A 

[Bug c++/96781] internal compiler error: Segmentation fault

2020-08-25 Thread pengtingbit at 126 dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96781

Ting Peng  changed:

   What|Removed |Added

 CC||pengtingbit at 126 dot com

--- Comment #1 from Ting Peng  ---
Created attachment 49118
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49118&action=edit
the build files by cmake

mkdir build
cd build
cmake ..
make