"Mohamed Shafi" <[EMAIL PROTECTED]> writes: > Can anybody tell me the purpose of the testcase > testsuite\gcc.dg\special\gcsec-1.c in the gcc testsuite ? > Is it something related with garbage clooection? > > What exactly doec this testcase test ?
It's intended to test linker garbage collection of unused functions and variables. The idea is that the linker will remove the function "unused", since it is not used. See the linker documentation for the --gc-sections option. This test doesn't actually really test anything except that the options don't actually cause an error. A complete test would check that the function "unused" does not in fact appear in the output. As far as I can tell that is not actually checked. Ian