The German Krummlauf, or curved barrel, was an experimental attachment for the early assault rifles (MP43, MP 44) to be able to shoot around corners without exposing the firer. Though the idea was tried out for city fighting, being able to shoot somewhat accurately around the corner of a building, that was not its most successful application. That application was to mount a curved barrel on a movable mount on tanks in order to fire down on attacking troops close-in to the tank. The idea had a great deal of merit for defense of armored vehicles and was examined by the US military after World War II.
There were some simple bent barrels made for the M3A1 submachinegun. These were just a longer barrel with a 30 degree curve bent into the barrel. The project was considered for city fighting, but never went beyond experimental stages. For the defense of tanks, the idea was considerably more developed.
The most developed of the curved barrels was the periscope-mounted version. The barrel of the submachinegun would be inserted into the base of the curved barrel and locked in place with a large collet nut. This curved barrel was one of the longest of this type produced. Instead of being an actual barrel, the curved front half of the device was a trough with the inside part of the curve open to the air. The fired projectiles would hit the very thick metal of the curved portion of the barrel and be forced to move 90 degrees to the normal direction of travel. The projectiles would be deformed from their travel through the curve, and would occasionally break up. But for close in defense of a tank, they were sufficiently lethal for their purpose.
One mount used in the M4 Sherman was in the turret top. In place of the standard M6 periscope on the upper left side of the turret top was the T20, a model that could accept the curved greasegun barrel along the side of the periscope body. The barrel could be rotated 360 degrees as well as elevated or lowered 40 degrees. This allows the M3 submachinegun inserted into the curved barrel to sweep the sides and decks of the tank.