I did this, since one of my AR9 carbines in built on a Glock-compatible lower.
I picked up an 8.5" Kaw Valley Precision .40S&W barrel from JobBob's Outfitters, along with a New Frontier Amory .40 Bolt Carrier Group. I also swapped out the Spikes ST-9X 7.7oz buffer for a heavier 8.4oz one to counteract the extra umph of the .40. I decided on a regular A2-style flash hider, rather than one of many linear comps. I paired it with a generic carbine-length free-float tube, a set of HK sights, and a Primary Arms red dot.
I tried it with 165gr WWB and Federal 180gr. The Federal is a little longer and has a more rounded ogive, and feeds flawlessly. The shorter/flatter 165gr WWB started to hiccup. That stubby round is making quite a jump into the barrel.
I used the Federal to sight the red dot in, POA at 25 yards. What surprised me was how easy it was, once sighted-in at 25 yards, to consistently ring the 18" gong at 100 yards. Pretty much POA/POI.
It's really fun to shoot. I like how it runs on the 180gr, and the .40S&W really thumps the falling steel plates on the range. I'll try and get a picture up of the setup.
I recommend trying it, especially if you have one of the Glock-compatible lower