1/* { dg-do compile } */
2/* { dg-options "-O2 -fdump-tree-gimple" } */
3
4int
5foo (int align)
6{
7  int off = 0 % align;
8  return off ? align - off : 0;
9}
10
11/* We should have optimized away the mod operator before we gimpleized
12   the code.  */
13/* { dg-final { scan-tree-dump-times "%" 0 "gimple"} } */
14/* { dg-final { cleanup-tree-dump "gimple" } } */
15