G++-13 Ошибка компилятора Ubuntu с модулями [закрыто]C++

Программы на C++. Форум разработчиков
Ответить
Anonymous
 G++-13 Ошибка компилятора Ubuntu с модулями [закрыто]

Сообщение Anonymous »

Ошибка/ошибка компилятора в g++-13 в Ubuntu. При компиляции кода, который включает/импортирует и/или , я получаю сообщение об ошибке ниже. Кроме того, в самом низу находится мой файл make.
У кого-то был похожий текст об ошибке

Код: Выделить всё

during RTL pass: expand
In file included from /usr/include/c++/13/string:43,
from /usr/include/c++/13/bits/locale_classes.h:40,
from /usr/include/c++/13/bits/ios_base.h:41,
from /usr/include/c++/13/iomanip:42,
of module /usr/include/c++/13/iomanip, imported at Tester.ixx:5:
In member function ‘constexpr _Tp* std::allocator<                 >::allocate(std::size_t) [with _Tp = char]’,
inlined from ‘static constexpr _Tp* std::allocator_traits::allocate(allocator_type&, size_type) [with _Tp = char]’ at /usr/include/c++/13/bits/   alloc_traits.h:482:28,
inlined from ‘static constexpr std::__cxx11::basic_string::pointer  std::__cxx11::basic_string::_S_allocate(_Char_alloc_type&, size_type)  [with _CharT = char; _Traits = std::char_traits; _Alloc = std::allocator]’ at /usr/ include/c++/13/bits/basic_string.h:126:39:
/usr/include/c++/13/bits/allocator.h:193:39: internal compiler error: in make_decl_rtl, at varasm.cc:1442
193 |             if (__builtin_mul_overflow(__n, sizeof(_Tp), &__n))
|                 ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
0x658a99 make_decl_rtl(tree_node*)
../../src/gcc/varasm.cc:1442
0x14a11db expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**,   bool)
../../src/gcc/expr.cc:10863
0x15432b8 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool)
../../src/gcc/expr.cc:9000
0x15432b8 store_expr(tree_node*, rtx_def*, int, bool, bool)
../../src/gcc/expr.cc:6330
0x153fee5 expand_assignment(tree_node*, tree_node*, bool)
../../src/gcc/expr.cc:6048
0x153ef9e expand_gimple_stmt_1
../../src/gcc/cfgexpand.cc:3946
0x153ef9e expand_gimple_stmt
../../src/gcc/cfgexpand.cc:4044
0x1500581 expand_gimple_basic_block
../../src/gcc/cfgexpand.cc:6106
0x1500581 execute
../../src/gcc/cfgexpand.cc:6841
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
make: *** [Makefile:30: Tester.o] Error 1

Код: Выделить всё

MAKEFILE

objects = Customer.o User.o Driver.o ViewLocation.o Location.o View.o Drawable.o Tester.o

all: test

test: test.cc $(objects) prerequisites
g++-13 -fmodules-ts -std=c++2b -xc++  -c tests.cc $(objects) #-g

debug: $(objects)   prerequisites
g++-13 -fmodules-ts -std=c++2b -xc++  -o tests.cc $(objects) #-g
Customer.o: Customer.ixx prerequisites
g++-13 -fmodules-ts -std=c++2b -xc++  -c Customer.ixx #-g

User.o: User.ixx prerequisites
g++-13 -fmodules-ts -std=c++2b -xc++  -c User.ixx #-g

Driver.o:   Driver.ixx prerequisites
g++-13 -fmodules-ts -std=c++2b -xc++  -c Driver.ixx #-g

ViewLocation.o: ViewLocation.ixx prerequisites
g++-13 -fmodules-ts -std=c++2b -xc++  -c ViewLocation.ixx #-g
Location.o: Location.ixx prerequisites
g++-13 -fmodules-ts -std=c++2b -xc++  -c Location.ixx #-g
View.o: View.ixx prerequisites Location.o
g++-13 -fmodules-ts -std=c++2b -xc++  -c View.ixx #-g

Drawable.o: Drawable.ixx prerequisites
g++-13 -fmodules-ts -std=c++2b -xc++  -c Drawable.ixx #-g

Tester.o:   Tester.ixx prerequisites
g++-13 -fmodules-ts -std=c++2b -xc++  -c Tester.ixx #-g

prerequisites:
g++-13 -std=c++2b -fmodules-ts -xc++-system-header iomanip
g++-13 -std=c++2b -fmodules-ts -xc++-system-header  string
g++-13 -std=c++2b -fmodules-ts -xc++-system-header iostream
g++-13 -std=c++2b -fmodules-ts -xc++-system-header cctype
g++-13 -std=c++2b -fmodules-ts -xc++-system-header algorithm
g++-13 -std=c++2b -fmodules-ts -xc++-system-header sstream
g++-13 -std=c++2b -fmodules-ts -xc++-system-header vector
g++-13 -std=c++2b -fmodules-ts -xc++-system-header   cstdlib
g++-13 -std=c++2b -fmodules-ts -xc++-system-header  random
g++-13 -std=c++2b -fmodules-ts -xc++-system-header  unordered_set
clean:
rm -f test *.o && rm -r gcm.cache
Я попробовал вернуться к заголовкам и файлам .cc; однако все равно возникла та же ошибка.

Подробнее здесь: https://stackoverflow.com/questions/791 ... th-modules
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C++»