My dad had two bear encounters in Alaska.
First time he was stalked by a bear while fishing so I gave him an Aussie L1A1, the Brit version of an FN FAL, for protection. He was later attacked by a bear near his cabin and I can report that the L1A1 was very effective at bear protection.
One of the big problems with bear spray is that problem bears are getting sprayed multiple times and they are getting used to being sprayed so for some reason the sprays are less effective if the bear has been sprayed multiple times.
Great story.
I am sure that it is very effective as a defensive weapon but it seems like that it would be pretty heavy for a hiker to carry through the woods.
Of course unloading a 20 round mag in to a bear should end an attack.
An inch pattern version of the FN FAL, is the term that is commonly used. UK and most Commonwealth countries. Belgium, Austria, Brazil, Germany, many others, used metric pattern guns.