kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

attr_p2_07_used_static.c (355B)


      1 /* Phase 2: __attribute__((used)) on a static prevents --gc-sections from
      2  * removing it. The retention check requires a link-time test (parallel
      3  * to test/link/link_layout retain tests). Here we only confirm parse +
      4  * codegen succeed and the value is reachable. */
      5 static int kept __attribute__((used)) = 11;
      6 
      7 int test_main(void) { return kept - 11; }