ptgen: work around gcc miscompilation