Tested on x86_64-pc-linux-gnu, committed on trunk 2012-07-17 Pascal Obry <o...@adacore.com>
* s-regexp.adb (Adjust): Fix access violation in Adjust.
Index: s-regexp.adb =================================================================== --- s-regexp.adb (revision 189565) +++ s-regexp.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1999-2010, AdaCore -- +-- Copyright (C) 1999-2012, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -100,10 +100,12 @@ Tmp : Regexp_Access; begin - Tmp := new Regexp_Value (Alphabet_Size => R.R.Alphabet_Size, - Num_States => R.R.Num_States); - Tmp.all := R.R.all; - R.R := Tmp; + if R.R /= null then + Tmp := new Regexp_Value (Alphabet_Size => R.R.Alphabet_Size, + Num_States => R.R.Num_States); + Tmp.all := R.R.all; + R.R := Tmp; + end if; end Adjust; -------------