[Bug c++/95291] New: ICE

2020-05-23 Thread wouter at voti dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95291

Bug ID: 95291
   Summary: ICE
   Product: gcc
   Version: 10.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: wouter at voti dot nl
  Target Milestone: ---

The compiler ICE's on this code. I used the 10.0.1 on windows, but the 10.1.0
on compiler explorer gives the same ICE. Options: g++ --std=c++20

https://godbolt.org/z/As6Rm7

template< typename T = int >
class xy { }; 

template< xy _size >
struct window_root { };

template< typename minion >
struct flip_horizontally : window_root< minion::size >{ };

[Bug c++/95301] New: excessive error messages

2020-05-24 Thread wouter at voti dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95301

Bug ID: 95301
   Summary: excessive error messages
   Product: gcc
   Version: 10.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: wouter at voti dot nl
  Target Milestone: ---

This code emits an excessive amount of error messages, which seem to repeat.
Detected on windows using 10.0.1, but compiler exporer gives the same effect
with 10.1

https://godbolt.org/z/AY5m-b

template< typename T = int_fast64_t, T zero = 0 >
class xy final { }; 

template< typename T, T v >
class range {
   xy< T, v > start;
   xy< T, v > limit;
public:
   range( xy< T, v > limit ):
  start( limit::zero, limit( limit )  // wovo missing ) after zero
   {}
};

template<>
struct box_root< bool > : _box_root< bool > {};

template< typename T >
struct _no_inline_box_init : T {};

template< typename T >
struct _no_inline_box_write : T {};

template< typename T >
struct _no_inline_box_read : T {};

template< typename T >
struct _no_inline_box_direction : T {};

template< typename T >
using no_inline = 
   _no_inline_box_init<
   _no_inline_box_write<
   _no_inline_box_read<
   _no_inline_box_direction< T > > > >;

[Bug c++/83583] New: ICE in synthesize_implicit_template_parm, at cp/parser.c:38794

2017-12-24 Thread wouter at voti dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83583

Bug ID: 83583
   Summary: ICE in synthesize_implicit_template_parm, at
cp/parser.c:38794
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: wouter at voti dot nl
  Target Milestone: ---

The compiler ICE's on this construct. There are some simular bug reports which
might be the same problem or a related one, but they report a different
parser.c line.

using  arm-eabi-gcc (GCC) 7.2.0 -fconcepts

code:

template< typename T > 
concept bool has_main = requires {
   { T::main() } -> void;   
};  

template< typename T >
concept bool is_duration_with_polling = requires (
   has_main m
){ 
   { template callback< m >::init() } -> void
};

[Bug c++/59955] New: G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate

2014-01-27 Thread wouter at voti dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59955

Bug ID: 59955
   Summary: G++ 4.8 internal compiler error: Segmentation fault on
(re?)defining a struct template as function template,
when inside a struct tempate
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: wouter at voti dot nl

Created attachment 31960
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31960&action=edit
then offending source file

The following code gives an 
   internal compiler error: Segmentation fault

template< int xyz >
struct wovo {

   template< int n >
   void us(){}

   template< int n >
   struct us< n > {};
};

using G++ 4.8 cross-compiler for ARM, running on Windows

"C:/Program Files (x86)/GNU Tools ARM Embedded/4.8
2013q4/bin/arm-none-eabi-g++" -fno-builtin -nostartfiles -fno-exceptions 
-mcpu=cortex-m0 -mthumb -fomit-frame-pointer -fno-threadsafe-statics
-fno-use-cxa-get-exception-ptr -I. -Ic:/bmptk/bmptk/bmptk/bmptk  -Ichips 
-Itargets -Ic:/bmptk/bmptk/bmptk/bmptk/stdlib
-Ic:/bmptk/bmptk/bmptk/bmptk/targets/cortex/cmsis
-Ic:/bmptk/bmptk/bmptk/bmptk/targets/cortex
-Ic:/bmptk/bmptk/bmptk/bmptk/targets/cortex/cmsis/11xx/inc -DLANGUAGE_CPP   
-DBMPTK_EMBEDDED_HEAP -DBMPTK_TARGET=db103 -DBMPTK_TARGET_db103
-DBMPTK_CHIP=lpc1114fn28 -DBMPTK_CHIP_lpc1114fn28 -DBMPTK_XTAL=1200
-DBMPTK_BAUDRATE=38400 -DBMPTK_VERSION=V02.00-work-in-progress-2013-11-11
-DBMPTK_TICKS_PER_US=6 -DBMPTK_GRAPHICS -Ic:/bmptk/bmptk/bmptk/bmptk  -Werror 
-fno-rtti -fno-exceptions  -std=c++11 -Wall  -Wno-unused-local-typedefs
-Wno-unused-function -fdata-sections -ffunction-sections -Os  -c -o main.o
main.cpp


[Bug c++/59955] G++ 4.8 internal compiler error: Segmentation fault on (re?)defining a struct template as function template, when inside a struct tempate

2014-01-27 Thread wouter at voti dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59955

Wouter van Ooijen  changed:

   What|Removed |Added

 Target||ARM
   Host||windows
Version|unknown |4.8.3

--- Comment #1 from Wouter van Ooijen  ---
-v retrun:

Using built-in specs.
COLLECT_GCC=arm-none-eabi-g++
Target: arm-none-eabi
Configured with: /home/build/work/GCC-4-8-build/src/gcc/configure
--build=i686-linux-gnu --host=i586-mingw32 --target=arm-none-eabi
--prefix=/home/build/work/GCC-4-8-build/install-mingw
--libexecdir=/home/build/work/GCC-4-8-build/install-mingw/lib
--infodir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/info
--mandir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/man
--htmldir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/html
--pdfdir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc-arm-none-eabi/pdf
--enable-languages=c,c++ --disable-decimal-float --disable-libffi
--disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp
--disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads
--disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes --with-newlib
--with-python-dir=share/gcc-arm-none-eabi
--with-sysroot=/home/build/work/GCC-4-8-build/install-mingw/arm-none-eabi
--with-libiconv-prefix=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-gmp=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-mpfr=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-mpc=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-isl=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-cloog=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-libelf=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--with-pkgversion='GNU Tools for ARM Embedded Processors'
--with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.8.3 20131129 (release) [ARM/embedded-4_8-branch revision 205641]
(GNU Tools for ARM Embedded Processors)


[Bug c++/60399] New: constexpr ctor that does not init an attribute should be rejected but isn't

2014-03-03 Thread wouter at voti dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60399

Bug ID: 60399
   Summary: constexpr ctor that does not init an attribute should
be rejected but isn't
   Product: gcc
   Version: 4.8.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: wouter at voti dot nl

Created attachment 32250
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32250&action=edit
cpp stanalone main file that shows the problem

AFAIK A constexpr constructor that does not initialize all attributes should be
rejected. In the attached code, which is accepted by the compiler, such a
constructor is invoked in the initialization of a static class attribute.

To my surprise the compiler generates an init_array entry for this (which is
what triggered me to dig into this, I work with a linkerscript that does not
allow any int_array entries). The generated entry is basically empty, just

static done = false;
if( ! done ){
   done = true;
}

When I make the constexpr constructor initialize the attribute the init_array
entry is gone.

I use GCC for ARM, 4.8.3

"C:/Program Files (x86)/GNU Tools ARM Embedded/4.8
2013q4/bin/arm-none-eabi-g++" -nostartfiles  -mcpu=cortex-m0 -mthumb
-fomit-frame-pointer -march=armv6-m -Wall -Werror -Wno-unused-local-typedefs
-Wno-maybe-uninitialized -fdata-sections -ffunction-sections -Os -fno-rtti
-fno-exceptions  -fno-threadsafe-statics -fno-use-cxa-get-exception-ptr
-std=c++11 -c -o main.o main.cpp


[Bug c++/99775] New: segmentation fault on template variable as template parameter

2021-03-25 Thread wouter at voti dot nl via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99775

Bug ID: 99775
   Summary: segmentation fault on template variable as template
parameter
   Product: gcc
   Version: 10.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: wouter at voti dot nl
  Target Milestone: ---

Segmentation fault with 10.x (on gotbolt ) on this code:

#include 

template< int N >
constexpr auto immutable_string_decimal = std::array< char, 1 >( '0' + N );

template< std::array strings > struct component_name  { };

template< int n >
struct blink : component_name< immutable_string_decimal< 8 > > { };