In theory, a computer program whose copyright expires enters the public domain, which is largely equivalent to an all-permissive free software license without attribution, such as the WTFPL. But in practice, copyright in a computer program created since "free software" became a thing is unlikely to ever expire in most of the industrialized world, for reasons quite unrelated to computer programs.
Whenever copyright in works published in the mid-1920s is due to expire in the United States, two organizations* lobby for a retrospective copyright term extension in an industrialized jurisdiction not subject to a rule analogous to "for limited Times" rule of the U.S. Constitution. Then they lobby for "harmonization" bills in other countries. This most recently happened in the 1990s with the Copyright Duration Directive of 1993 in the European Union, followed by the Copyright Term Extension Act of 1998 in the United States. The music and film industry associations of America then proceed to push the newly "harmonized" term to the rest of the world through the U.S. Trade Representative.
"But what about copyrights in free software that have already expired?"
No copyright in a computer program published after the GNU Manifesto has expired. In fact, the vast majority of works by anyone who was alive to see ENIAC run are still under copyright. (The largest exception includes U.S. works published prior to 1964 whose copyright was not renewed in the 28th year.) This leaves pretty much Ada Lovelace's programs for Charles Babbage's Analytical Engine.
* These organizations are The Walt Disney Company and Gershwin Enterprises.