Bug C++ 111974 (Segmentation fault of GCC, ubuntu 23.10, compiling RefPerSys 041d5d70aefd)

2023-10-25 Thread Basile Starynkevitch

Hello all,


Sorry for this non-minimal bug report. I was unable to make a shorter or 
minimal bug example.


RefPerSys is a GPLv3+ open source project for an inference engine. See 
http://refpersys.org/ for ambitions and some details. (I am currently 
more interested in working on RefPerSys than on debugging GCC, to which 
I did contribute earlier). RefPerSys is itself on github in 
https://github.com/RefPerSys/RefPerSys/


I am compiling RefPerSys (mostly C++ code, including some self 
generated, which is including in the below snapshot) on Ubuntu 23.10 
whose g++ has version  (Ubuntu 13.2.0-4ubuntu3) 13.2.0 on a desktop with 
AMD Ryzen Threadripper 2970WX


The RefPerSys commit is 
https://github.com/RefPerSys/RefPerSys/commit/041d5d70aefd047de4eb456432853beefffb4120 
and has a few tests: eg make test00 test01 did work a few days ago.


I uploaded to 
http://refpersys.org/refpersys-gcc13bug-snapshot-25oct2023-git041d5d70aefd0.tar.bz2 
a bzip2 compressed tarball (29246912 bytes) of md5sum 
6b1d2985ce86bd1718d05af3d93a84f9


That tarball is likely to be removed in a few months.

The disk space for the RefPerSys source code (with object files) take 
less than 200 Mbytes.


To reproduce the GCC bug, run make (GNU make 4.3 from Ubuntu) in the tarball

If you did reproduce it, please email me (Basile Starynkevitch, in 
France) to bas...@starynkevitch.net


Regards

--
Basile Starynkevitch
 
(only mine opinions / les opinions sont miennes uniquement)
92340 Bourg-la-Reine, France
web page: starynkevitch.net/Basile/



Re: GCC 14 jit API in C++ for creating union types?

2024-12-13 Thread Basile Starynkevitch
On Fri, 2024-12-13 at 11:03 +0100, Basile Starynkevitch wrote:
> Hello all,
> 
> On GNU Linux/Ubuntu/x86_64 I am using libgccjit++ (in
> https://github.com/RefPerSys/RefPerSys/ - a GPLv3+ inference engine
> project) but I cannot understand how to create in C++ a union type.
> 
> 
> Today (Dec 13, 2024) the file
> https://gcc.gnu.org/onlinedocs/jit/cp/topics/types.html
> don't explain how to create a GCCJIT union type.
> 
> Is there a simple C++ example creating a union for libgccjit 14?
> 
> Thanks
> 

It seems that gcc_jit_context_new_union_type exists as a C callable
function in /usr/lib/gcc/x86_64-linux-gnu/14/include/libgccjit.h but
has not yet a C++ wrapping function?

Or did I misunderstood the libgccjit API?

Thanks

-- 
Basile STARYNKEVITCH   
8 rue de la Faïencerie
92340 Bourg-la-Reine,  France
http://starynkevitch.net/Basile & https://github.com/bstarynk 


gcc trunk a0a202d07339 Linux/Debian/x86-64/trixie/sid fail to build stage2

2025-01-29 Thread Basile Starynkevitch
2:7: note: candidate 16:
‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with
_CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]’
  532 |   basic_string()
  |   ^~~~
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:532:7: note: candidate expects 0 arguments, 1
provided
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:186:7: note: candidate 17:
‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(__sv_wrapper,
const _Alloc&) [with _CharT = char; _Traits = std::char_traits; _Alloc =
std::allocator]’
  186 |   basic_string(__sv_wrapper __svw, const _Alloc& __a)
  |   ^~~~
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:186:7: note: candidate expects 2 arguments, 1
provided
make[3]: *** [Makefile:1208: jit/dummy-frontend.o] Error 1
make[3]: Leaving directory '/usr/src/Lang/_GccTrunk/gcc'
make[2]: *** [Makefile:5096: all-stage2-gcc] Error 2
make[2]: Leaving directory '/usr/src/Lang/_GccTrunk'
make[1]: *** [Makefile:25405: stage2-bubble] Error 2
make[1]: Leaving directory '/usr/src/Lang/_GccTrunk'
make: *** [Makefile:1100: all] Error 2

Thanks.

regards
-- 
Basile STARYNKEVITCH   
8 rue de la Faïencerie
92340 Bourg-la-Reine,  France
http://starynkevitch.net/Basile & https://github.com/bstarynk 


GCC trunk 2a8af97e3528f fail to build on Debian/Trixie/x86-64

2025-06-05 Thread Basile Starynkevitch
om ‘gcc::jit::recording::string* const’ to
‘std::__cxx11::basic_string&&’
  742 |   basic_string(basic_string&& __str) noexcept
  |~~~^
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:684:7: note: candidate 10:
‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const
_CharT*, size_type, const _Alloc&) [with _CharT = char; _Traits =
std::char_traits; _Alloc = std::allocator; size_type = long unsigned
int]’
  684 |   basic_string(const _CharT* __s, size_type __n,
  |   ^~~~
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:684:7: note: candidate expects 3 arguments, 1
provided
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:664:7: note: candidate 11:
‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const
std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type,
const _Alloc&) [with _CharT = char; _Traits = std::char_traits; _Alloc =
std::allocator; size_type = long unsigned int]’
  664 |   basic_string(const basic_string& __str, size_type __pos,
  |   ^~~~
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:664:7: note: candidate expects 4 arguments, 1
provided
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:646:7: note: candidate 12:
‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const
std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, size_type)
[with _CharT = char; _Traits = std::char_traits; _Alloc =
std::allocator; size_type = long unsigned int]’
  646 |   basic_string(const basic_string& __str, size_type __pos,
  |   ^~~~
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:646:7: note: candidate expects 3 arguments, 1
provided
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:629:7: note: candidate 13:
‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const
std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, size_type, const _Alloc&)
[with _CharT = char; _Traits = std::char_traits; _Alloc =
std::allocator; size_type = long unsigned int]’
  629 |   basic_string(const basic_string& __str, size_type __pos,
  |   ^~~~
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:629:7: note: candidate expects 3 arguments, 1
provided
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:613:7: note: candidate 14:
‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const
std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char;
_Traits = std::char_traits; _Alloc = std::allocator]’
  613 |   basic_string(const basic_string& __str)
  |   ^~~~
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:613:40: note: no known conversion for argument 1
from ‘gcc::jit::recording::string* const’ to ‘const
std::__cxx11::basic_string&’
  613 |   basic_string(const basic_string& __str)
  |^
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:601:7: note: candidate 15:
‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(const
_Alloc&) [with _CharT = char; _Traits = std::char_traits; _Alloc =
std::allocator]’
  601 |   basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
  |   ^~~~
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:601:34: note: no known conversion for argument 1
from ‘gcc::jit::recording::string* const’ to ‘const std::allocator&’
  601 |   basic_string(const _Alloc& __a) _GLIBCXX_NOEXCEPT
  |~~^~~
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:585:7: note: candidate 16:
‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string() [with
_CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]’
  585 |   basic_string()
  |   ^~~~
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:585:7: note: candidate expects 0 arguments, 1
provided
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:192:7: note: candidate 17:
‘std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::basic_string(__sv_wrapper,
const _Alloc&) [with _CharT = char; _Traits = std::char_traits; _Alloc =
std::allocator]’
  192 |   basic_string(__sv_wrapper __svw, const _Alloc& __a)
  |   ^~~~
/usr/src/Lang/_GccTrunk/prev-x86_64-linux-gnu/libstdc++-
v3/include/bits/basic_string.h:192:7: note: candidate expects 2 arguments, 1
provided
make[3]: *** [Makefile:1210: jit/dummy-frontend.o] Error 1
make[3]: Leaving directory '/usr/src/Lang/_GccTrunk/gcc'
make[2]: *** [Makefile:5117: all-stage2-gcc] Error 2
make[2]: Leaving directory '/usr/src/Lang/_GccTrunk'
make[1]: *** [Makefile:25507: stage2-bubble] Error 2
make[1]: Leaving directory '/usr/src/Lang/_GccTrunk'
make: *** [Makefile:1103: all] Error 2
rimski src/Lang/_GccTrunk 10:40 % 

kernel is 6.12.13

Hope this helps.


-- 
Basile STARYNKEVITCH
8 rue de la Faïencerie   http://starynkevitch.net/Basile/  
92340 Bourg-la-Reine https://github.com/bstarynk
Francehttps://github.com/RefPerSys/RefPerSys