/* PR c/68187. */ /* { dg-options "-Wmisleading-indentation" } */ /* { dg-do compile } */ extern int foo (int); extern int bar (int, int); extern int flagA; extern int flagB; extern int flagC; extern int flagD; /* Before the "}". */ void test1_a (void) { if (flagA) { foo (1); } else if (flagB) foo (2); foo (3); } /* Aligned with the "}". */ void test1_b (void) { if (flagA) { foo (1); } else if (flagB) foo (2); foo (3); } /* Indented between the "}" and the "else". */ void test1_c (void) { if (flagA) { foo (1); } else if (flagB) foo (2); foo (3); } /* Aligned with the "else". */ void test1_d (void) { if (flagA) { foo (1); } else if (flagB) foo (2); foo (3); } /* Indented between the "else" and the "if". */ void test1_e (void) { if (flagA) { foo (1); } else if (flagB) foo (2); foo (3); } /* Aligned with the "if". */ void test1_f (void) { if (flagA) { foo (1); } else if (flagB) foo (2); foo (3); } /* Indented more than the "if". */ void test1_g (void) { if (flagA) { foo (1); } else if (flagB) foo (2); foo (3); } /* Again, but without the 2nd "if". */ /* Before the "}". */ void test2_a (void) { if (flagA) { foo (1); } else foo (2); foo (3); } /* Aligned with the "}". */ void test2_b (void) { if (flagA) { foo (1); } else foo (2); foo (3); } /* Indented between the "}" and the "else". */ void test2_c (void) { if (flagA) { foo (1); } else foo (2); foo (3); } /* Aligned with the "else". */ void test2_d (void) { if (flagA) { foo (1); } else foo (2); foo (3); } /* Indented more than the "else". */ void test2_e (void) { if (flagA) { foo (1); } else foo (2); foo (3); }