1 // { dg-options "-fdiagnostics-show-caret" } 2 // { dg-do compile { target c++11 } } 3 4 struct A 5 { 6 virtual void foo() const; 7 }; 8 9 struct B final final : A /* { dg-error "duplicate virt-specifier" } 10 { dg-begin-multiline-output "" } 11 struct B final final : A 12 ^~~~~ 13 ----- 14 { dg-end-multiline-output "" } */ 15 { 16 virtual void foo() const override final override; /* { dg-error "duplicate virt-specifier" } 17 { dg-begin-multiline-output "" } 18 virtual void foo() const override final override; 19 ^~~~~~~~ 20 -------- 21 { dg-end-multiline-output "" } */ 22 }; 23 24 thread_local thread_local int i = 0; /* { dg-error "duplicate" } 25 { dg-begin-multiline-output "" } 26 thread_local thread_local int i = 0; 27 ^~~~~~~~~~~~ 28 ------------ 29 { dg-end-multiline-output "" } */ 30