[Bug c++/99528] New: [modules] ICE with iostream& vector
nathan at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 10 20:39:20 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99528
Bug ID: 99528
Summary: [modules] ICE with iostream& vector
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: nathan at gcc dot gnu.org
Target Milestone: ---
I broke something.
#include <iostream>
#include <vector>
int main(){
std::cout << "Hello World!" << std::endl;
std::vector<int> v;
v.push_back(0);
std::cout << v[0] << std::endl;
return 0;
}
build iostream & vector as header units, then build:
n file included from
../x86_64-pc-linux-gnu/libstdc++-v3/include/bits/ios_base.h:46,
from ../x86_64-pc-linux-gnu/libstdc++-v3/include/ios:42,
from ../x86_64-pc-linux-gnu/libstdc++-v3/include/ostream:38,
from ../x86_64-pc-linux-gnu/libstdc++-v3/include/iostream:39,
of module ./../x86_64-pc-linux-gnu/libstdc++-v3/include/iostream, imported at
m.cc:1:
../x86_64-pc-linux-gnu/libstdc++-v3/include/system_error: In instantiation of
'struct std::is_error_code_enum<const char*>':
../x86_64-pc-linux-gnu/libstdc++-v3/include/system_error:189:39: required by
substitution of 'template<class _ErrorCodeEnum, class>
std::error_code::error_code(_ErrorCodeEnum) [with _ErrorCodeEnum = const char*;
<template-parameter-1-2> = <missing>]'
m.cc:5:16: required from here
../x86_64-pc-linux-gnu/libstdc++-v3/include/system_error:60:51: internal
compiler error: tree check: expected template_decl, have function_decl in
decl_value, at cp/module.cc:7938
60 | struct is_error_code_enum : public false_type { };
| ^
0x1acdd53 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../../src/gcc/tree.c:9816
0xad685c tree_check(tree_node*, char const*, int, char const*, tree_code)
../../../src/gcc/tree.h:3353
0xcc2df7 trees_in::decl_value()
../../../src/gcc/cp/module.cc:7938
0xcc8e49 trees_in::tree_node(bool)
../../../src/gcc/cp/module.cc:9174
More information about the Gcc-bugs
mailing list