repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Match: Add pattern for `(a ? b : 0) | (a ? 0 : c)` into `a ? b : c` [PR103660]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
conversion
/
cond6.C
blob
8c05e1b143ca72fe536b0ebb3490365226653e17
1
// PR c++/11283
2
// Converting "a" to the type of "i" produces "int" rather than "const
3
// int", which was causing build_conditional_expr to abort. But we don't
4
// care about cv-quals on non-class rvalues.
5
6
struct A
7
{
8
operator int ();
9
};
10
11
extern A a;
12
extern const int i;
13
extern bool b;
14
15
int f ()
16
{
17
return b ? a : i;
18
}