Тестовые примеры компилятора или как проверить компилятор

Компиляторы, как и все программное обеспечение, также будут подвержены ошибкам, логическим ошибкам.

Как проверить вывод, сгенерированный компилятором. Как правило, мой вопрос (есть)

How to validate that the machine code generated is correct?

How to ensure that the machine code generated is according to the language specification.

Does it make sense to just pick an open source project (in C if one is also writing a compiler in C) to just compile it through the "compiler". In that case also, how do judge that the compiler is behaving as expected.

Are there any formal test cases (literature) provided by the language standards committee that a "language complying" compiler has to satisfy?

What are the sure "give aways" that the problem in a program compiled by a compiler is a compiler bug and not a program bug.

- Any examples where mainstream compilers get confused and compile the code wrong?

Ссылки на любую литературу будут оценены.

Ответы на вопрос(7)

Ваш ответ на вопрос