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
PR middle-end/77674
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wdiv-by-zero-bogus-2.C
blob
b7556eaac30badc06c2d16e98db16bdbc19976ea
1
// PR c++/57132
2
3
template<unsigned m, unsigned a>
4
struct mod
5
{
6
static unsigned calc(unsigned x) {
7
unsigned res = a * x;
8
if (m)
9
res %= m;
10
return res;
11
}
12
};
13
14
int main()
15
{
16
mod<3,2>::calc(7);
17
mod<0,2>::calc(7);
18
}