public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/17954] New: Legal program rejected, packed array of booleans
@ 2004-10-12 18:54 ludovic dot brenta at insalien dot org
  2004-11-01  1:40 ` [Bug ada/17954] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: ludovic dot brenta at insalien dot org @ 2004-10-12 18:54 UTC (permalink / raw)
  To: gcc-bugs

Debian Bug #276227:

-- interestingly, the error message is different depending on
-- the number of enumeration elements in T1 and T2.
package Test_124 is
   type T1 is (b01,b02,b03,b04,b05,b06,b07,b08,b09,b10,
               b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,
               b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,
               b31,b32);

   type T1_arr_unconstrained is array (T1 range <>) of boolean;
   type T1_arr_constrained is new T1_arr_unconstrained (T1);
   pragma pack (T1_arr_unconstrained);
   for T1_arr_constrained'size use 32; -- line 12

   type T2 is (b01,b02,b03,b04,b05,b06,b07,b08,b09,b10,
               b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,
               b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,
               b31);   -- one fewer than T1

   type T2_arr_unconstrained is array (T2 range <>) of boolean;
   type T2_arr_constrained is new T2_arr_unconstrained (T2);
   pragma pack (T2_arr_unconstrained);
   for T2_arr_constrained'size use 32; -- line 22
end Test_124;


The actual output from GCC 3.4.2 is:

test_124.ads:12:04: size given for "T1_arr_constrained" too small
test_124.ads:12:04: explicit pragma Pack is required
gnatmake: "test_124.ads" compilation error

If line 12 is commented out:

test_124.ads:22:36: size for "T2_arr_constrained" too small, minimum allowed is 248
gnatmake: "test_124.ads" compilation error

-- 
           Summary: Legal program rejected, packed array of booleans
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ludovic dot brenta at insalien dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i486-linux
  GCC host triplet: i486-linux
GCC target triplet: i486-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17954


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug ada/17954] Legal program rejected, packed array of booleans
  2004-10-12 18:54 [Bug ada/17954] New: Legal program rejected, packed array of booleans ludovic dot brenta at insalien dot org
@ 2004-11-01  1:40 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-01  1:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-01 01:40 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-01 01:40:31
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17954


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-01  1:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-12 18:54 [Bug ada/17954] New: Legal program rejected, packed array of booleans ludovic dot brenta at insalien dot org
2004-11-01  1:40 ` [Bug ada/17954] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).