Yeah, the problem comes down to 3 things.
First, the barrel isn't long enough, gun barrels are usually only slightly shorter than the bayonet, mostly because the gun isn't supposed to be fired while the bayonet is attached.
Second, Bayonet's usually aren't axes, they're meant more for stabbing, than chopping or stabbing, so they end up more like knives (or are knives with a loop for bayonet use]
Finally, it's too far away from the barrel. Most bayonets are attached directly to the underside of very endo of the barrel.
Some real life bayonets for reference.