public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/62236] New: <built-in>: error: aggregate value used where an integer was expected
@ 2014-08-23  4:56 porton at narod dot ru
  2014-10-29 22:19 ` [Bug ada/62236] " porton at narod dot ru
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: porton at narod dot ru @ 2014-08-23  4:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62236

            Bug ID: 62236
           Summary: <built-in>: error: aggregate value used where an
                    integer was expected
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: porton at narod dot ru

Created attachment 33382
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33382&action=edit
A program which doesn't compile

The below program (its copy is also attached) does not compile. We suspect a
compiler bug.

$ gnatgcc -v
Using built-in specs.
COLLECT_GCC=gnatgcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i586-linux-gnu/4.9/lto-wrapper
Target: i586-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.1-4'
--with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-i386/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-i386
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-i386
--with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-targets=all --enable-multiarch --with-arch-32=i586
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-checking=release --build=i586-linux-gnu --host=i586-linux-gnu
--target=i586-linux-gnu
Thread model: posix
gcc version 4.9.1 (Debian 4.9.1-4)

$ gnatgcc -c -g -O2 -gnat2012 -g -O0 -gnato -fstack-check -gnatVa
special_test.adb
<built-in>: In function ‘Special_Test’:
<built-in>: error: aggregate value used where an integer was expected

with Ada.Iterator_Interfaces;

procedure Special_Test is

   type My_Description_Cursor is null record;

   function Has_Element (Position: My_Description_Cursor) return Boolean is
(False);

   package My_Description_Iterators is new
Ada.Iterator_Interfaces(My_Description_Cursor, Has_Element);

   type My_Description_Iterator is new
My_Description_Iterators.Forward_Iterator with null record;

   overriding function First (Object: My_Description_Iterator) return
My_Description_Cursor is (null record);
   overriding function Next (Object: My_Description_Iterator; Position:
My_Description_Cursor) return My_Description_Cursor is (null record);

   My_Iterator: My_Description_Iterator;

begin
   for C in My_Iterator loop
      null;
   end loop;
end;
>From gcc-bugs-return-459085-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Aug 23 05:12:32 2014
Return-Path: <gcc-bugs-return-459085-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1598 invoked by alias); 23 Aug 2014 05:12:31 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 1527 invoked by uid 48); 23 Aug 2014 05:12:25 -0000
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/61998] [5 Regression] ICE: Segmentation fault with -Wsuggest-final-types
Date: Sat, 23 Aug 2014 05:12:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: trippels at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-61998-4-dQpRItsTh1@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61998-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61998-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-08/txt/msg01582.txt.bz2
Content-length: 1585

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida998

--- Comment #5 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #4)
> I suppose VECtors do not like to grow to 0 size.  THe following patch fixes
> the ICE, does it also fixe you real testcases?
> Index: ipa-devirt.c
> ==================================================================> --- ipa-devirt.c        (revision 214303)
> +++ ipa-devirt.c        (working copy)
> @@ -3822,6 +3845,9 @@ ipa_devirt (void)
>    int nmultiple = 0, noverwritable = 0, ndevirtualized = 0, nnotdefined = 0;
>    int nwrong = 0, nok = 0, nexternal = 0, nartificial = 0;
>
> +  if (!odr_types.length ())
> +    return 0;
> +
>    /* We can output -Wsuggest-final-methods and -Wsuggest-final-types
> warnings.
>       This is implemented by setting up final_warning_records that are
> updated
>       by get_polymorphic_call_targets.

That patch would crash the minimal and empty testcase even without
-Wsuggest-final-types.

You probably mean:

diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index 2e74ca61c508..acfd5d2fdede 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -3822,6 +3822,9 @@ ipa_devirt (void)
   int nmultiple = 0, noverwritable = 0, ndevirtualized = 0, nnotdefined = 0;
   int nwrong = 0, nok = 0, nexternal = 0, nartificial = 0;

+  if (!odr_types_ptr)
+    return 0;
+
   /* We can output -Wsuggest-final-methods and -Wsuggest-final-types warnings.
      This is implemented by setting up final_warning_records that are updated
      by get_polymorphic_call_targets.


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

* [Bug ada/62236] <built-in>: error: aggregate value used where an integer was expected
  2014-08-23  4:56 [Bug ada/62236] New: <built-in>: error: aggregate value used where an integer was expected porton at narod dot ru
@ 2014-10-29 22:19 ` porton at narod dot ru
  2014-10-29 23:01 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: porton at narod dot ru @ 2014-10-29 22:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62236

--- Comment #1 from Victor Porton <porton at narod dot ru> ---
Confirmed in GNAT GPL 2014.


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

* [Bug ada/62236] <built-in>: error: aggregate value used where an integer was expected
  2014-08-23  4:56 [Bug ada/62236] New: <built-in>: error: aggregate value used where an integer was expected porton at narod dot ru
  2014-10-29 22:19 ` [Bug ada/62236] " porton at narod dot ru
@ 2014-10-29 23:01 ` ebotcazou at gcc dot gnu.org
  2015-03-08 19:16 ` porton at narod dot ru
  2015-04-23 23:05 ` porton at narod dot ru
  3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-10-29 23:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62236

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-10-29
                 CC|                            |ebotcazou at gcc dot gnu.org
     Ever confirmed|0                           |1
           Severity|major                       |normal

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
GNAT GPL has nothing to do with this Bugzilla though.


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

* [Bug ada/62236] <built-in>: error: aggregate value used where an integer was expected
  2014-08-23  4:56 [Bug ada/62236] New: <built-in>: error: aggregate value used where an integer was expected porton at narod dot ru
  2014-10-29 22:19 ` [Bug ada/62236] " porton at narod dot ru
  2014-10-29 23:01 ` ebotcazou at gcc dot gnu.org
@ 2015-03-08 19:16 ` porton at narod dot ru
  2015-04-23 23:05 ` porton at narod dot ru
  3 siblings, 0 replies; 5+ messages in thread
From: porton at narod dot ru @ 2015-03-08 19:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62236

--- Comment #3 from Victor Porton <porton at narod dot ru> ---
It does not work also with GANT 4.9.2.


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

* [Bug ada/62236] <built-in>: error: aggregate value used where an integer was expected
  2014-08-23  4:56 [Bug ada/62236] New: <built-in>: error: aggregate value used where an integer was expected porton at narod dot ru
                   ` (2 preceding siblings ...)
  2015-03-08 19:16 ` porton at narod dot ru
@ 2015-04-23 23:05 ` porton at narod dot ru
  3 siblings, 0 replies; 5+ messages in thread
From: porton at narod dot ru @ 2015-04-23 23:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62236

Victor Porton <porton at narod dot ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|4.9.2                       |5.1.0

--- Comment #4 from Victor Porton <porton at narod dot ru> ---
Not fixed in 5.1.0.


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

end of thread, other threads:[~2015-04-23 23:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-23  4:56 [Bug ada/62236] New: <built-in>: error: aggregate value used where an integer was expected porton at narod dot ru
2014-10-29 22:19 ` [Bug ada/62236] " porton at narod dot ru
2014-10-29 23:01 ` ebotcazou at gcc dot gnu.org
2015-03-08 19:16 ` porton at narod dot ru
2015-04-23 23:05 ` porton at narod dot ru

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).