Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/g++.dg/lto/odr-3_1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/g++.dg/lto/odr-3_1.C Thu Feb 13 11:34:05 2020 +0900 @@ -0,0 +1,16 @@ +typedef struct YYSTYPE { // { dg-lto-message "type" 2 } + // We get two notes here: + // note: a different type is defined in another translation unit + // note: a type with different number of fields is defined in another translation unit +} YYSTYPE; +union yyalloc { // { dg-lto-message "type" 2 } + // We get here three notes: + // note: a different type is defined in another translation unit + // note: type 'union yyalloc' itself violates the C++ One Definition Rule + short yyss; + YYSTYPE yyvs; // { dg-lto-message "field of same name but different type is defined in another translation unit" } + +}; + +yyalloc a; // { dg-lto-message "'a' was previously declared here" } +