Created attachment 6106 [details] Testcase About `-fvisibility=hidden' option, see <http://gcc.gnu.org/PR51523>.
Bug 13497: "LTO keeps unneeded functions (mingw32 target)".
Another bug: LD removes a function given as an argument to `--entry=...' option. Symbol `_foo' gets PREVAILING_DEF_IRONLY_EXP resolution.
Created attachment 6134 [details] Testcase #2
Created attachment 6253 [details] Testcase #3