This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Abt gcses-1.c testcase


"Mohamed Shafi" <shafitvm@gmail.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]