We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if
&str
bool
godbolt
E0308
#![allow(unused)] fn main() { if "Not a bool" { // ^^^^^^^^^^^^ expected `bool`, found `&str` } }
Analyzing compilation unit ../mahad-testsuite/E0308.rs: In function ‘E0308::main’: ../mahad-testsuite/E0308.rs:4:1: internal compiler error: in fold_convert_loc, at fold-const.cc:2504 4 | if "Not a bool" { | ^~ 0x8010bf fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gccrs/gcc/fold-const.cc:2504 0xf63ac8 gimplify_cond_expr ../../gccrs/gcc/gimplify.cc:4441 0xf55244 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gccrs/gcc/gimplify.cc:16333 0xf580da gimplify_stmt(tree_node**, gimple**) ../../gccrs/gcc/gimplify.cc:7219 0xf559cb gimplify_statement_list ../../gccrs/gcc/gimplify.cc:2019 0xf559cb gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gccrs/gcc/gimplify.cc:16821 0xf580da gimplify_stmt(tree_node**, gimple**) ../../gccrs/gcc/gimplify.cc:7219 0xf58767 gimplify_bind_expr ../../gccrs/gcc/gimplify.cc:1430 0xf5508b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gccrs/gcc/gimplify.cc:16577 0xf76943 gimplify_stmt(tree_node**, gimple**) ../../gccrs/gcc/gimplify.cc:7219 0xf76943 gimplify_body(tree_node*, bool) ../../gccrs/gcc/gimplify.cc:17638 0xf76d9f gimplify_function_tree(tree_node*) ../../gccrs/gcc/gimplify.cc:17837 0xd95c37 cgraph_node::analyze() ../../gccrs/gcc/cgraphunit.cc:684 0xd98237 analyze_functions ../../gccrs/gcc/cgraphunit.cc:1247 0xd98f81 symbol_table::finalize_compilation_unit() ../../gccrs/gcc/cgraphunit.cc:2554 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.
The text was updated successfully, but these errors were encountered:
philberty
Successfully merging a pull request may close this issue.
ICE - when
if
contains&str
instead ofbool
godbolt
Code Tested from
E0308
Meta
Error output
Backtrace
The text was updated successfully, but these errors were encountered: