Countries like Saudi Arabia, Norway and Chile have long used sovereign-wealth funds to sock away windfall profits from periods of high prices for commodity exports like oil and metals for future years when their own production winds down or international prices plunge. Ireland on Tuesday created its own rainy-day fund thanks to outsize profits from an unusual and controversial source of income: U.S. technology and pharmaceutical giants seeking to lower their tax bills. In the past eight years, the country of five million has watched its corporate tax income triple to the tune of 22.6 billion euros last year, equivalent...