Launchpad has imported 8 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68668.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://documentation.ubuntu.com/launchpad/user/reference/bugs/multi-project-bugs/about-multi-project-bugs/#bugs-in-external-trackers.

------------------------------------------------------------------------
On 2015-12-03T09:03:05+00:00 Trippels wrote:

% cat vp8_dx_iface.i
typedef const int vp8_tree[];
int fn1(vp8_tree p1) { return p1[0]; }

 % gcc -c vp8_dx_iface.i
vp8_dx_iface.i: In function ‘fn1’:
vp8_dx_iface.i:2:1: error: invalid use of array with unspecified bounds
 int fn1(vp8_tree p1) { return p1[0]; }
 ^~~

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvpx/+bug/1528297/comments/0

------------------------------------------------------------------------
On 2015-12-03T09:14:03+00:00 Trippels wrote:

Started with r231194.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvpx/+bug/1528297/comments/1

------------------------------------------------------------------------
On 2015-12-03T13:37:46+00:00 Mpolacek wrote:

I'll have a go at this.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvpx/+bug/1528297/comments/2

------------------------------------------------------------------------
On 2015-12-03T15:53:37+00:00 Mpolacek wrote:

I'm using slightly adjusted testcase:

typedef const int T[];
int
fn1 (T p)
{
  return p[0];
}

It looks like grokdeclarator creates a wrong type for PARM_DECL "p".  It says 
its type is "const int[<unknown>] *", but that doesn't seem to be correct, it 
should be "const int *".  That also the reason why we generate this bogus 
warning:
m.c:5:10: warning: return makes integer from pointer without a cast 
[-Wint-conversion]
   return p[0];
          ^

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvpx/+bug/1528297/comments/3

------------------------------------------------------------------------
On 2015-12-03T16:41:15+00:00 Mpolacek wrote:

Looks like this fixed it and passes dg.exp testsuite:

--- a/gcc/c/c-decl.c
+++ b/gcc/c/c-decl.c
@@ -6417,6 +6417,8 @@ grokdeclarator (const struct c_declarator *declarator,
      {
        /* Transfer const-ness of array into that of type pointed to.  */
        type = TREE_TYPE (type);
+       if (orig_qual_type != NULL_TREE)
+         orig_qual_type = TREE_TYPE (orig_qual_type);
        if (type_quals)
          type = c_build_qualified_type (type, type_quals, orig_qual_type,
                         orig_qual_indirect);

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvpx/+bug/1528297/comments/4

------------------------------------------------------------------------
On 2015-12-07T17:52:55+00:00 Mpolacek wrote:

Author: mpolacek
Date: Mon Dec  7 17:52:23 2015
New Revision: 231374

URL: https://gcc.gnu.org/viewcvs?rev=231374&root=gcc&view=rev
Log:
        PR c/68668
        * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
        TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.

        * gcc.dg/pr68668.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr68668.c
Modified:
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-decl.c
    trunk/gcc/testsuite/ChangeLog

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvpx/+bug/1528297/comments/5

------------------------------------------------------------------------
On 2015-12-07T17:55:16+00:00 Mpolacek wrote:

Fixed.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvpx/+bug/1528297/comments/6

------------------------------------------------------------------------
On 2015-12-31T00:25:31+00:00 Jsm28 wrote:

Author: jsm28
Date: Thu Dec 31 00:24:59 2015
New Revision: 232014

URL: https://gcc.gnu.org/viewcvs?rev=232014&root=gcc&view=rev
Log:
Backport PR c/68668 patch to fix PR c/69037.

gcc/c:
        PR c/69037
        Backport from mainline:

        2015-12-07  Marek Polacek  <[email protected]>

        PR c/68668
        * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
        TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.

gcc/testsuite:
        PR c/69037
        Backport from mainline:

        2015-12-07  Marek Polacek  <[email protected]>

        PR c/68668
        * gcc.dg/pr68668.c: New test.

Added:
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr68668.c
Modified:
    branches/gcc-5-branch/gcc/c/ChangeLog
    branches/gcc-5-branch/gcc/c/c-decl.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog

Reply at:
https://bugs.launchpad.net/ubuntu/+source/libvpx/+bug/1528297/comments/16


** Changed in: gcc
       Status: Unknown => Fix Released

** Changed in: gcc
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1528297

Title:
  libvpx FTBFS with gcc 5.3 on armhf

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1528297/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to