Fix ICE on loop over constant vector at -O
Eric Botcazou
ebotcazou@adacore.com
Sat Dec 8 11:45:00 GMT 2012
This is an internal error in for_each_index at -O:
+===========================GNAT BUG DETECTED==============================+
| 4.8.0 20121208 (experimental) [trunk revision 194319] (x86_64-suse-linux)
GCC error:|
| in for_each_index, at tree-ssa-loop-im.c:324 |
| Error detected around vect9.adb:45:1|
The callback is invoked on a vector CONST_DECL and stops. That's an unusual
situation (the CONST_DECL is wrapped up in a VIEW_CONVERT_EXPR to array type)
but IMO there is no reason to accept other DECLs and stop on CONST_DECLs.
Tested on x86_64-suse-linux, applied on the mainline as obvious.
2012-12-08 Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-loop-im.c (for_each_index) <CONST_DECL>: New case.
2012-12-08 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/vect9.ad[sb]: New test.
* gnat.dg/vect9_pkg.ads: New helper.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 347 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121208/d272fedf/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vect9.adb
Type: text/x-adasrc
Size: 976 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121208/d272fedf/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vect9.ads
Type: text/x-adasrc
Size: 229 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121208/d272fedf/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vect9_pkg.ads
Type: text/x-adasrc
Size: 521 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20121208/d272fedf/attachment-0003.bin>
More information about the Gcc-patches
mailing list