This species is found in littoral forests on sandy soils, and has also been occasionally reported from grasslands. The distribution information here is provisional because the specimens are on loan and determinations have not been updated.
The African plants of C. longifolia, the other species of Cordylostigma that has been reported from Madagascar, were separated from C. virgata based on having a bearded pubescent corolla throat (Bremekamp, 1952) and also by (Verdcourt, 1976) broader corolla lobes, 1.3-4 mm wide, vs. a glabrous corolla throat and corolla lobes 0.8-1.2 mm wide in C. virgata. However in practice C. longifolia seems to have been distinguished in Madagascar by having an apparently annual habit with the stems weak at the base, somewhat broader leaves, and the flowers few and well separated with the capsules borne on pedicels 5-10 mm long (--20 mm on plants from mainland Africa), vs. at least often a perennial habit with the stems mostly erect, the leaves narrow and ascending, and the flowers several to numerous and mostly in closely-set groups of 3-5 with most of the capsules borne on pedicels less than 5 mm long. The separation of these species is complicated by the fact that many (if not most) of the specimens identified as C. longifolia from both eastern Africa and Madagascar have corollas that are apparently glabrous internally, rather than pubescent or bearded, and the corolla lobes are often similar in width in both groups of specimens. Cordylostigma virgata has been more commonly collected than C. longifolia.
!CMT, V 2011